0

I have been building a calculator with a GUI in python and finished, and I went back to update stuff and simplify the coding and know I am running into text encoding issues. I had them fixed and had everything set to UTF-16 and it was working just fine. I cam back now and I am getting this error:

File "D:\Documents\Scripts\Python\Calculator\Calculator\CalculatorGUI.pyw", line 1
SyntaxError: Non-UTF-8 code starting with '\xfe' in file D:\Documents\Scripts\Python\Calculator\Calculator\CalculatorGUI.pyw on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Now \xfe is now where in my code, and it was working before. So I don't know what could have changed. If you need to see the whole script, comment, and I will post it all.

Thanks

EDIT: Per request, here is the file https://drive.google.com/file/d/0B35OsPAJ46kvZXl2OTN3Y19IOUE/edit?usp=sharing

7
  • possible duplicate: stackoverflow.com/questions/6289474/… Commented Jun 2, 2014 at 21:53
  • probably upload the script somewhere ... dont copy and paste or we might not see the same bytes Commented Jun 2, 2014 at 21:54
  • @shavenwarthog I already declared the encoding type and I am still getting the same problem Commented Jun 2, 2014 at 21:57
  • @JoranBeasley script uploaded Commented Jun 2, 2014 at 21:58
  • did you open it with something other than eclipse at some point? it seems to have a funny encoding for sure ... Commented Jun 2, 2014 at 22:05

1 Answer 1

1

you probably need to convert the file to utf8 (notepad++ can do this easily ..., that seemed to work for me)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.