Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding=utf-8 #1

Open
osos opened this issue Jan 21, 2018 · 4 comments
Open

Encoding=utf-8 #1

osos opened this issue Jan 21, 2018 · 4 comments

Comments

@osos
Copy link

osos commented Jan 21, 2018

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
Copy link
Owner

janLo commented Jan 21, 2018

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
Copy link

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
Copy link

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
Copy link

me21 commented Jul 4, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants