0
guys!我在Debian 7终端上试图运行一个通过电报-cli发送消息的python脚本。下面这行给我一个错误:Debian终端中的UnicodeEncodeError
check_call(["/usr/local/tg/bin/telegram-cli", "-W", "-k", "/usr/local/tg/tg-server.pub", "-e", msg])
在此行结束后,“味精”是一个变量...
的错误是这样的:
Traceback (most recent call last):
File "LogServicos.py", line 60, in <module>
msg_telegram()
File "LogServicos.py", line 17, in msg_telegram
check_call(["/usr/local/tg/bin/telegram-cli", "-W", "-k", "/usr/local/tg/tg-server.pub", "-e", msg])
File "/usr/local/lib/python3.5/subprocess.py", line 579, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/local/lib/python3.5/subprocess.py", line 560, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/local/lib/python3.5/subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.5/subprocess.py", line 1483, in _execute_child
restore_signals, start_new_session, preexec_fn)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe7' in position 25: ordinal not in range(128)
的脚本完全功能在我的debian 15.10使用python 3.5.1,就像在Debian中一样。
任何帮助?谢谢!