matteoferla/DnD-battler

Syntax error on import due to encoding

Closed this issue · 1 comments

When trying to import the module, I get this output:

>>> import DnD

Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    import DnD
  File "DnD.py", line 25
SyntaxError: Non-ASCII character '\xe2' in file DnD.py on line 26, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Adding this line to the top of the file removes this problem:

# -*- coding: UTF-8 -*-

Thank you for pointing it out and sorry for that. Disappointingly, the unicode symbol in the code was an em dash. I was rather hoping I had used umlauts to make the variable more "mëtäl" to emphasise how brutal it was.