Succesfull compile, but bug in Python ?? (was: Re: Distutils prerequisites...)
maxm at mxm.dk
Sun Jan 27 02:18:36 CET 2002
Max M wrote:
>> Should work. Just install it, and try setup.py again.
> I did, and the setup stopped with::
> File "C:\python\Python21\lib\distutils\msvccompiler.py", line 220, in
> os.environ['path'] = string.join(path,';')
> File "C:\python\Python21\Lib\string.py", line 128, in join
> return sep.join(words)
> UnicodeError: ASCII decoding error: ordinal not in range(128)
> So maybe I am having problems because I am running on a Danish version
> of Windows 2000 ?
I guess that I can partly answer that question myself now. I installed
service pack 5 for Visual C. And that made no difference. So I looked in
"C:\python\Python21\lib\distutils\msvccompiler.py at line 220." And
there was a "path" variable of type list. One of the list items was a
Danish versions of "c:/Program Files/shared files .... etc." called:
u'C:\\Programmer\\Fælles filer\\Adaptec Shared\\System'
so my guess was that the Danish letter 'æ' was causing the problem.
I then added the two line of code:
if u'C:\\Programmer\\Fælles filer\\Adaptec Shared\\System' in path:
path.remove(u'C:\\Programmer\\Fælles filer\\Adaptec Shared\\System')
to "msvccompiler.py" before line 220. That made the darn thing compile.
So now I have a working version of ZODB tested with:
>>> import ZODB
>>> import ZODB.FileStorage
But the problem with the "ASCII decoding error" I get from
""C:\python\Python21\Lib\string.py", line 128" isn't that a bug??
I mean, it should be possible to use International characters in in a
pathname and still have Distutils working ... right?
Has anybody got an idea if it is a problem in the os, string or
distutils package?? until I find out I have no idea as to whom I shall
submit a bug report.
regards Max M
More information about the Python-list