Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python SSHLibrary UnicodeDecodeError:&x27;utf8';编解码器可以';t解码位置660处的字节0xa9:无效的开始字节_Python_Ssh_Robotframework - Fatal编程技术网

Python SSHLibrary UnicodeDecodeError:&x27;utf8';编解码器可以';t解码位置660处的字节0xa9:无效的开始字节

Python SSHLibrary UnicodeDecodeError:&x27;utf8';编解码器可以';t解码位置660处的字节0xa9:无效的开始字节,python,ssh,robotframework,Python,Ssh,Robotframework,我正在使用Robot Framework SSHLibrary打开与RHEL服务器的连接。但连接失败。Robot框架抛出以下错误 FAIL : UnicodeDecodeError: 'utf8' codec can't decode byte 0xa9 in position 660: invalid start byte 20151212 12:47:36.022 : DEBUG : Traceback (most recent call last): File "C:\Python2

我正在使用Robot Framework SSHLibrary打开与RHEL服务器的连接。但连接失败。Robot框架抛出以下错误

FAIL : UnicodeDecodeError: 'utf8' codec can't decode byte 0xa9 in position 660: invalid start byte
20151212 12:47:36.022 : DEBUG : 
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\SSHLibrary\library.py", line 792, in login
    return self._login(self.current.login, username, password, delay)

  File "C:\Python27\lib\site-packages\SSHLibrary\library.py", line 832, in _login
    login_output = login_method(username, *args)

  File "C:\Python27\lib\site-packages\SSHLibrary\abstractclient.py", line 150, in login
    return self._read_login_output(delay)

  File "C:\Python27\lib\site-packages\SSHLibrary\abstractclient.py", line 165, in _read_login_output
    return self.read(delay)

  File "C:\Python27\lib\site-packages\SSHLibrary\abstractclient.py", line 299, in read
    return self._decode(output)
  File "C:\Python27\lib\site-packages\SSHLibrary\abstractclient.py", line 302, in _decode
    return output.decode(self.config.encoding)
  File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True) 

开放连接中Robot Framework关键字给出了encoding=latin-1,因为在我从远程服务器的登录响应中出现了拉丁字符表示。
登录成功。

'\0xa9'.decode('utf-8')
'\0xa9'.encode('latin-1')
…能否请您输入导致问题的字符串行否,在SSH连接期间,我的远程计算机对Robot Framework做出响应,我无法修改这些。默认情况下,机器人框架编码为UTF-8,因此无法识别十六进制字符。