rmst / yoke

Turns your Android device into a customizable gamepad for Windows/Mac/Linux
MIT License
219 stars 24 forks source link

Non-ASCII character '\xe2' in file #47

Closed fabiopolancoe closed 4 years ago

fabiopolancoe commented 4 years ago

Hello, i tried to run yoke on Ubuntu Mate. But, when i type python yoke. It prints this error:

Traceback (most recent call last): File "yoke", line 4, in <module> import yoke File "/home/fabio/.local/lib/python2.7/site-packages/yoke/__init__.py", line 1, in <module> from yoke.service import Device, Service, EVENTS File "/home/fabio/.local/lib/python2.7/site-packages/yoke/service.py", line 112 SyntaxError: Non-ASCII character '\xe2' in file /home/fabio/.local/lib/python2.7/site-packages/yoke/service.py on line 112, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

medape commented 4 years ago

This doesn't usually happen. The apparent cause of your error (Python 2 needs to be instructed to use UTF-8 to understand the character ) is a consequence of a bigger error (your system should be using Python 3). I hadn't thought that Linux tends to assume Python 2 as the default.

I just uploaded a commit that should fix it, please test it. If it goes right, I'll make a pull request.

Still... the installation path in your message reads python2.7, which is odd. Did you install this using pip instead of pip3?

fabiopolancoe commented 4 years ago

I installed yoke using pip. I will try to do it using pip3

fabiopolancoe commented 4 years ago

It worked. Thanks @medape!