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

fun-langid: Encoding error when running with Python 3 #7

Open
mihnita opened this issue Sep 25, 2023 · 2 comments
Open

fun-langid: Encoding error when running with Python 3 #7

mihnita opened this issue Sep 25, 2023 · 2 comments

Comments

@mihnita
Copy link

mihnita commented Sep 25, 2023

Uncommented the last 2 lines (langid = ... and print)

Executed this from command prompt, on macos:

python3 fun_langid.py

Error:

SyntaxError: Non-UTF-8 code starting with '\xd1' in file .../fun-langid/fun_langid.py on line 76, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
@mihnita mihnita changed the title Encoding error when running with Python 3 fun-langid: Encoding error when running with Python 3 Sep 25, 2023
@icaswell
Copy link

Ah oops it was working on my gLinux, but you're right it doesn't work on MacOS! Good catch.

I just tried running it on mac, and it worked to add # coding: utf8 to the top of the file. Does this work for you as well?

@icaswell
Copy link

Just submitted 6ce0aec that should fix this

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

2 participants