Can anyone confirm this modulefinder bug?

Discussion in 'Python' started by Roger Binns, Jun 23, 2004.

  1. Roger Binns

    Roger Binns Guest

    - 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.

    It started happening when using cx_Freeze on Linux and BundleBuilder
    on Mac, and the mbcs encoded file is generated by makepy from win32all
    (ie it is Python code generated from a COM type library). Since
    modulefinder parses byte codes, it ignores the fact that I only
    import the file when sys.platform == "win32".

    Removing the coding line doesn't result in the error any more.

    Roger
     
    Roger Binns, Jun 23, 2004
    #1
    1. Advertising

  2. "Roger Binns" <> 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
    >>>


    Thomas
     
    Thomas Heller, Jun 23, 2004
    #2
    1. Advertising

  3. Thomas Heller <> writes:

    > "Roger Binns" <> 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
     
    Thomas Heller, Jun 23, 2004
    #3
  4. Roger Binns

    Roger Binns Guest

    Thomas Heller wrote:
    > > 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?


    I believe Anthony Tuininga will be filing it. I originally was
    using cx-Freeze on Linux and reported the issue on that mailing
    list. Anthony also found it to be present in Python 2.4 CVS
    and volunteered to report it.

    Roger
     
    Roger Binns, Jun 24, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bryan Martin

    Confirm a bug.....

    Bryan Martin, Nov 23, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    419
    Bryan Martin
    Nov 23, 2003
  2. Ian
    Replies:
    0
    Views:
    298
  3. Yves Daoust
    Replies:
    1
    Views:
    254
    Richard Townsend
    Sep 16, 2004
  4. =?ISO-8859-1?Q?G=E9rard_Talbot?=

    Confirm a serious CSS bug in IE 7 (infinite loop)

    =?ISO-8859-1?Q?G=E9rard_Talbot?=, Mar 11, 2007, in forum: HTML
    Replies:
    0
    Views:
    289
    =?ISO-8859-1?Q?G=E9rard_Talbot?=
    Mar 11, 2007
  5. Brock Pytlik
    Replies:
    0
    Views:
    281
    Brock Pytlik
    Jan 13, 2010
Loading...

Share This Page