EspArduinoExceptionDecoder icon indicating copy to clipboard operation
EspArduinoExceptionDecoder copied to clipboard

Encoding=utf-8

Open osos opened this issue 7 years ago • 4 comments
trafficstars

Got this on Linuxmint 18.3:

Traceback (most recent call last): File "../../EspArduinoExceptionDecoder/decoder.py", line 305, in <module> resolver.fill(parser) File "../../EspArduinoExceptionDecoder/decoder.py", line 190, in fill self._lookup(addresses) File "../../EspArduinoExceptionDecoder/decoder.py", line 164, in _lookup output = subprocess.check_output(cmd, encoding="utf-8") File "/usr/lib/python3.5/subprocess.py", line 626, in check_output **kwargs).stdout File "/usr/lib/python3.5/subprocess.py", line 693, in run with Popen(*popenargs, **kwargs) as process: TypeError: __init__() got an unexpected keyword argument 'encoding'

$ python3 --version Python 3.5.2

osos avatar Jan 21 '18 12:01 osos

New in version 3.6: encoding and errors were added.

... Sometimes python is real "fun" .. I'll have a look into this as soon as I'm back on a laptop.

janLo avatar Jan 21 '18 15:01 janLo

Same issue here:

Traceback (most recent call last):
  File "./decoder.py", line 305, in <module>
    resolver.fill(parser)
  File "./decoder.py", line 190, in fill
    self._lookup(addresses)
  File "./decoder.py", line 164, in _lookup
    output = subprocess.check_output(cmd, encoding="utf-8")
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 693, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'encoding'
python3 --version
Python 3.5.2

glynhudson avatar Jan 31 '18 20:01 glynhudson

I "fixed" the issue by using python 2.7 by changing

#!/usr/bin/env python3

to

#!/usr/bin/env python

At the top of the script.

glynhudson avatar Jan 31 '18 20:01 glynhudson

Works as-is for me with Python 3.6.5 on Windows.

me21 avatar Jul 04 '18 15:07 me21