Closed rtd62 closed 7 years ago
This is very odd. Were you able to resolve this issue? I have two theories:
I am having the same issue with syntax as well. When I run my worker I get these errors:
Traceback (most recent call last): File "ebooks.py", line 7, in <module> from local_settings import * File "/app/local_settings.py", line 11 SyntaxError: Non-ASCII character '\xe2' in file /app/local_settings.py on line 11, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Hi @Furgersen7, if this StackOverflow thread is accurate, it seems you might have introduced a stray byte in your local_settings.py somehow. Here's a promising solution. Do you want to try it?
I am also having this issue, and have tried all the solutions posed on StackOverflow. Any suggestions?
@mackmo, so you're certain you're not using smartquotes inadvertently? What kind of text editor are you using?
I'm using Mac's TextEdit program. All smart options are off, and I've run it through this diacritics remover with no issues, but it still won't run.
What error message you getting, @mackmo?
Here's the message:
Traceback (most recent call last): File "ebooks.py", line 7, in <module> from local_settings import * File "/app/local_settings.py", line 7 SyntaxError: Non-ASCII character '\xe2' in file /app/local_settings.py on line 7, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
@mackmo I don't know much about TextEdit. You should try something like TextWrangler. With that, you can turn on View>Text Display>Show Invisibles to see that extra character that snuck in there.
Thanks! Problem solved, I'll stick to TextWrangler from now on.
@mackmo 👍🏼
After pushing the files to the master app on Heroku and running "worker", I get these two errors:
Running worker on ⬢ secret-taiga-39619... up, run.2390 Traceback (most recent call last): File "ebooks.py", line 7, in <module> from local_settings import * File "/app/local_settings.py", line 12 SOURCE_ACCOUNTS = [“frontend_bot”] ^ SyntaxError: invalid syntax