0

I've been using python from time to time for some small projects and just started using it again after quite a while. I'm using Enthoughts Canopy IDE and get the following error:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 1: ordinal not in range(128)

I know that I have to define the encoding first and I do so in the 2nd Line:

" # -- coding: utf-8 -- "

but when I run the script within Canopy I keep getting the error whenever I enter one of the following letters: ä,ö,ü as user input When I start my script via console ("python XXX.py" or "ipython XXX.py") it works like a charm .

I'm just a little confused since I thought Canopy uses the ipython interpreter so there shouldn't be any differences whether I start it from console as ipython or via canopy

best regards

1 Answer 1

1

are you running this code from an unsaved buffer? If yes, this is a known issue in Canopy 1.0 and should be fixed in the next update. If no, can you provide a minimal example to reproduce your problem, so this can be fixed? Thanks!

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

1 Comment

Thanks for your help, it looks like the unsaved buffer was the issue

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.