1
votes

Robot Framework show error when my directory has Chinese

My environment is as below:

  • pywin32 (220)
  • robotframework (3.0.2)
  • robotframework-archivelibrary (0.3.2)
  • robotframework-archivelibrary (0.3.2)
  • robotframework-databaselibrary (0.8.1)
  • robotframework-ftplibrary (1.3)
  • robotframework-ride (1.5.2.1)
  • robotframework-selenium2library (1.8.0)
  • robotframework-sshlibrary(2.1.3)
  • selenium (3.0.2)

enter image description here

enter image description here

Traceback (most recent call last): File "C:\Python27\lib\site-packages\robotide\contrib\testrunner\testrunnerplugin.py", line 370, in OnTimer self._test_runner.get_output_and_errors(self.get_current_profile()) File "C:\Python27\lib\site-packages\robotide\contrib\testrunner\testrunner.py", line 250, in get_output_and_errors stdout, stderr, returncode = self._process.get_output(), \ File "C:\Python27\lib\site-packages\robotide\contrib\testrunner\testrunner.py", line 305, in get_output return self._output_stream.pop() File "C:\Python27\lib\site-packages\robotide\contrib\testrunner\testrunner.py", line 400, in pop return result.decode('UTF-8') File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xb5 in position 84: invalid start byte Traceback (most recent call last): File "C:\Python27\lib\site-packages\robotide\contrib\testrunner\testrunnerplugin.py", line 370, in OnTimer self._test_runner.get_output_and_errors(self.get_current_profile()) File "C:\Python27\lib\site-packages\robotide\contrib\testrunner\testrunner.py", line 250, in get_output_and_errors stdout, stderr, returncode = self._process.get_output(), \ File "C:\Python27\lib\site-packages\robotide\contrib\testrunner\testrunner.py", line 305, in get_output return self._output_stream.pop() File "C:\Python27\lib\site-packages\robotide\contrib\testrunner\testrunner.py", line 400, in pop return result.decode('UTF-8') File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xb5 in position 36: invalid start byte

1

1 Answers

0
votes

Are you sure your path is UTF8 and not something different like UTF16? You could check using sys.getfilesystemencoding()