python fails to import sitecustomize.py due to encoding problem (Windows)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNUmed |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Under Windows python recognizes encoding as 'ascii'. I modified sitecustomize.py to set it explicitely to 'cp1250'. It seemed not to work, so I tried to pin-point the problem and under python shell tried:
>>> import sitecustomize
and got following response:
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import sitecustomize
File "C:\Program Files\Python\
SyntaxError: encoding problem: utf-8 (sitecustomize.py, line 1)
First line was:
# -*- coding: utf8 -*
I completely removed first line and everything works, so it may be a simple workaround.
But I don't know if we should change the first line of sitecustomize.py or is it Python bug to report?
Changed in gnumed: | |
importance: | Undecided → Low |
That's a Windows bug. Use of sitecustomize.py is discouraged, too.