473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Can anyone confirm this modulefinder bug?

- 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
Jul 18 '05 #1
3 1356
"Roger Binns" <ro****@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


Thomas
Jul 18 '05 #2
Thomas Heller <th*****@python.net> writes:
"Roger Binns" <ro****@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
Jul 18 '05 #3
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
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Logger | last post by:
Help, I’m trying to implement a confirm button on an asp.net page. I have it attached to a asp:button control. In the button1 click event I call the CreateConfirmBox subroutine. The Box comes...
0
by: Joe Finsterwald | last post by:
Recently I needed to add a confirm to a LinkButton that called a JavaScript function on success, and did nothing on failure. I found documentation on adding a confirm, but not on how to place a...
13
by: Chris | last post by:
I can create Javascript confirm message boxes during page creation, etc adding them to the button attributes (many good posts on this!). But how can I add this event after the button is pressed? I...
1
by: freshRecruit | last post by:
Hi, I am having a problem, and is driving me nuts and my deadline is fast approaching. Please do help me.. This is a webapplication with a usercontrol which has some buttons for adding,...
2
by: Wiktor Zychla [C# MVP] | last post by:
Could anyone confirm/deny that following is a bug (or at least an "unexpected behaviour")? If this is not a bug, I would be glad for a short explanation or a workaround. Issue: A generic...
1
by: chris | last post by:
Hi, In ASP.NET page, when my user tries to edit a record in gridview, I need to display a confirmation message, if another user is editing the same record. Since the confirmation message will...
4
by: tfsmag | last post by:
Okay, I have a project management app i'm writing and in the left hand menu i have a treeview control that is populated with each project... in child nodes under each project node I have an "edit"...
8
by: rn5a | last post by:
I have gone through a no. of posts in this NewsGroup regarding my problem but alas, couldn't come across one which would have helped me in resolving the issue. My problem is this: An ASPX Form...
5
by: strikefiend | last post by:
Ok, I'm somewhat new to .NET C# language and am having a bit of trouble. I'm trying to run the javascript confirm() method from my ascx page but I'm currently using C# as the main language of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.