简体   繁体   中英

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

However when I try to run it using python 2.7 I get an error saying

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM