Can anyone confirm this modulefinder bug?

Thomas Heller theller at python.net
Wed Jun 23 14:41:01 EDT 2004


Thomas Heller <theller at python.net> writes:

> "Roger Binns" <rogerb at rogerbinns.com> writes:
>
>> - Create foo.py
>>
>> # -*- coding: mbcs -*-
>> "string"
>> var1="1.2.3.4"
>> var2=0x123345
>>
>> - Do this at a python prompt
>>
>>> > > import modulefinder
>>> > > m=modulefinder.ModuleFinder()
>>> > > m.run_script("foo.py")
>>
>> You then get a traceback with a MemoryError (sorry I can't paste
>> the traceback due to this being via display protocol that doesn't
>> support the clipboard).
>>
>> I get this on Linux for sure and believe it is also being seen on Mac.
>> The issue does not occur on Windows.
>
> Yes, I can confirm this (Python 2.3+, linux x86).
> The problem appears to be this:
>
>>>> compile("# -*- coding: mbcs -*-", "<string>", "exec")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> MemoryError
>>>> 

For Windows, it's possible to also trigger it:

>>> compile("# -*- encoding: abc -*-", "<string>", "exec")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
MemoryError
>>>

Who files the bug?

Thomas



More information about the Python-list mailing list