janLo / EspArduinoExceptionDecoder

Python Script to decode ESP8266 Exceptions.
GNU General Public License v3.0
59 stars 25 forks source link

Encoding=utf-8 #1

Open osos opened 6 years ago

osos commented 6 years ago

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

janLo commented 6 years ago

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.

glynhudson commented 6 years ago

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 commented 6 years ago

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.

me21 commented 6 years ago

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