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

Roman C
  • 49,761
  • 33
  • 66
  • 176

1 Answers1

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!

punchagan
  • 5,566
  • 1
  • 19
  • 23