This error crashes when you try to create a project in MavenMate

Exception in thread Thread-8: Traceback (most recent call last): File "/home/stepan/.config/sublime-text-3/Packages/MavensMate/lib/mm_interface.py", line 327, in run response_body = '\n'.join(mm_response) TypeError: sequence item 0: expected str instance, bytes found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./python3.3/threading.py", line 901, in _bootstrap_inner File "/home/stepan/.config/sublime-text-3/Packages/MavensMate/lib/mm_interface.py", line 331, in run strs.append(line.decode('utf-8')) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 139: invalid start byte 

Here a code section on which swears enter image description here

  • it looks like byte strings met in mm_response - gil9red
  • No need to insert code in the form of a picture. The snippet shown hints that there is a problem reading the output from the child process. It should universal_newlines=True in subprocess.Popen pass or use io.TextIOWrapper() to transfer its encoding. Also, both threads should be read at the same time; otherwise processes can hang, if the output is sufficient, the child process will produce. - jfs

1 answer 1

  1. Look at the 327 line, you have it in mm_response there, and with the help of the join () method, you try to connect them with str, so you swear at it. As a warrant you can do so: b '\ n'.join (mm_response) or ' \ n'.join (mm_response.decode ('utf-8', 'replace'))

  2. In line 331 it is not possible to decode the line with bytes in utf-8 encoding, swear at some character, try it like this strs.append (line.decode ('utf-8', 'replace')) , and see your character it will be labeled "?", there already figure out what's stopping you according to the logic with the text.