LSP: TypeError: can't concat bytes to str
I am not sure how to reproduce, but I have enabled debug and this popped some time after:
:
2018-01-20 23:03:54,977 parso.python.diff diff parser start:
2018-01-20 23:03:54,978 parso.python.diff diff parser calculated:
2018-01-20 23:03:54,979 parso.python.diff diff: line_lengths old: 66, new: 66:
2018-01-20 23:03:54,979 parso.python.diff diff equal old[1:32] new[1:32]:
2018-01-20 23:03:54,980 parso.python.diff diff actually copy 1 to 7:
2018-01-20 23:03:55,013 parso.python.diff parse_part from 8 to 33 (to 33 in part parser):
2018-01-20 23:03:55,013 parso.python.diff diff replace old[33:33] new[33:33]:
2018-01-20 23:03:55,014 parso.python.diff diff equal old[34:66] new[34:66]:
2018-01-20 23:03:55,016 parso.python.diff parse_part from 34 to 34 (to 34 in part parser):
2018-01-20 23:03:55,017 parso.python.diff diff actually copy 35 to 65:
2018-01-20 23:03:55,018 parso.python.diff diff parser end:
2018-01-20 23:03:55,219 parso.cache pickle loaded: d:\user\dropbox\softwareversioning\pycodestyle\pycodestyle.py:
2018-01-20 23:03:55,289 pyls.config.config finish pyls_hover --> [hook]:
Exception in thread Thread-112:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "./python3.3/threading.py", line 858, in run
File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 164, in read_stderr
server_log(decoded.strip())
File "F:\SublimeText\Data\Packages\LSP\plugin\core\logging.py", line 18, in server_log
printf(*args, prefix=binary)
File "F:\SublimeText\Data\Packages\LSP\plugin\core\logging.py", line 23, in printf
print(prefix + ":", *args)
TypeError: can't concat bytes to str
Perhaps use print(prefix + ":", str(*args)) so we can know what it was trying to print?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (20 by maintainers)
Commits related to this issue
- Created debugging statement for tomv564/LSP#249 on plugin/core/logging.py — committed to evandrocoan/LSP by evandrocoan 6 years ago
- Improved plugin/core/logging.py to catch the exception type and put it on the log file too. Issue: tomv564/LSP#249 — committed to evandrocoan/LSP by evandrocoan 6 years ago
- New attempt to print/register the error tomv564/LSP#249 — committed to evandrocoan/LSP by evandrocoan 6 years ago
@evandrocoan @AmjadHD undecodeable UTF-8 sequences should now be replaced by question marks (https://github.com/tomv564/LSP/pull/803).