Here is my code and it looks fine.
import ael
while True:
cmd = input('AEL > ')
result, error = ael.run(cmd)
if error: print(error.as_string())
else: print(result)
But whenever I run it, wether it's from PyCharm (my IDE) or from the terminal, I always get the following error: SyntaxError: Non-UTF-8 code starting with '\xfe' in file C:\Users\[...] on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Here is what I have tried in an attempt to solve this issue:
# coding=utf-8 at the start of the program# -*- coding: utf-8 -*- at the start of the programHow would I solve this issue? Any potential solutions?
This happens sometimes because the file does not include the Byte Order Mark - BOM. Using IntelliJ IDEA (or any other JetBrains IDE) I solved the problem by adding the BOM through the encoding menu on the left bottom corner of the window:

You can do the same with any text editor that supports adding and removing BOM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With