Forums

SyntaxError: Non-ASCII character on comment (and some strings)

It's strange, but I started getting "SyntaxError: Non-ASCII character" in my script on hourly task. But it's on comment line. If I delete this line, it pops up on another comment.

I have no idea now. Did something changed?

UPD: Oh, and on stings as well. Most comment are not in english. But it's not the thing, because I have error on string with character ' in it.

If I change comments into english, it works. But earlier it worked normally without translating anything.

Which Python version do you use? It looks like the issue with Python 2.7. Try running your task with Python 3.x, maybe? See this help page.

Yep, it worked. Thanks. But I'm still confused, because this issue poped up only now.

Glad it's sorted. Did you change the script or the task recently?

Nope, that's the reason of my confusion. Even if I changed a line and forget about it, it doesn't explain why all of my comments and some strings became syntax errors

Thanks for letting us know. It's hard to reproduce now.