简体   繁体   English

索引81处不支持的格式字符'@'(0x40)

[英]Unsupported format character '@' (0x40) at index 81

I have taken the pexpect example shown here https://github.com/pexpect/pexpect/blob/master/examples/ssh_tunnel.py 我已经采取了这里显示的pexpect示例https://github.com/pexpect/pexpect/blob/master/examples/ssh_tunnel.py

However when I try to run it using python 2.7 I get an error saying 但是,当我尝试使用python 2.7运行它时,出现错误提示

Unsupported format character '@' (0x40) at index 81

If I take the @ out it seems to resolve the error but I get another exception. 如果我将@取出,似乎可以解决该错误,但会出现另一个异常。 I was wondering if it's because in the example the @ is right next to the % which causes wrong interpretation? 我想知道是否是因为在示例中@紧邻%会导致错误的解释? if so how do I go about resolving this? 如果是这样,我该如何解决呢? Thanks 谢谢

Looks like the code is just broken. 看起来代码刚刚坏了。 It should read %(user)s@%(host)s . 它应该显示为%(user)s@%(host)s

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ValueError: 不支持的格式字符 &#39;{&#39; (0x7b) at index 40 - Python &amp; CURL - ValueError: unsupported format character '{' (0x7b) at index 40 - Python & CURL ValueError:索引处不支持的格式字符&#39;{&#39;(0x7b) - ValueError: unsupported format character '{' (0x7b) at index ValueError:索引3处不支持的格式字符&#39;&lt;&#39;(0x3c) - ValueError: unsupported format character '<' (0x3c) at index 3 ValueError: 不支持的格式字符 &#39;p&#39; (0x70) 在索引 7 - ValueError: unsupported format character 'p' (0x70) at index 7 ValueError:索引798处不支持的格式字符&#39;P&#39;(0x50) - ValueError: unsupported format character 'P' (0x50) at index 798 ValueError:不支持的格式字符“!” (0x21) 在索引 2235 - ValueError: unsupported format character '!' (0x21) at index 2235 ValueError: 索引 21 处不支持的格式字符 ')' (0x29) - ValueError: unsupported format character ')' (0x29) at index 21 Python,Django:ValueError:索引3处不受支持的格式字符&#39;(&#39;(0x28) - Python, Django: ValueError: unsupported format character '(' (0x28) at index 3 ValueError:索引79处不支持的格式字符&#39;a&#39;(0x61) - ValueError: unsupported format character 'a' (0x61) at index 79 索引79处不支持的格式字符&#39;O&#39;(0x4f) - unsupported format character 'O' (0x4f) at index 79
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM