Problem with module

Studio Masson segreteria at studiomasson.it
Tue Apr 30 10:30:52 EDT 2002


Hello everybody.
I have a strange "problem" (well, it's not a real problem but...). I'm
developing a program in Python (2.2) and wxPython (well, it's my first
python program...). It works as i expect on two pc, one with Windows XP
professional, one with Windows 98. I simply "copy" the directory where the
sources are, and then i work, using IDLE. The program is always into the
same directory ("c:\dati\python") in all the computers. If i do the same
(copy the program's directory) on a windows ME system, and try to run the
program (CTRL-F5 with IDLE) it stops with the following message:

>>>
Traceback (most recent call last):
  File "C:\Dati\Python\PrimaNota\SMPNotaMain.py", line 1200, in ?
    PrimaNota = PNotaApp(0)
  File "C:\PYTHON22\lib\site-packages\wxPython\wx.py", line 1587, in
__init__
    _wxStart(self.OnInit)
  File "C:\Dati\Python\PrimaNota\SMPNotaMain.py", line 1193, in OnInit
    self.frame = MainFrame()
  File "C:\Dati\Python\PrimaNota\SMPNotaMain.py", line 90, in __init__
    self.PNDBCorrente = MemoryDB.MemoryDB()
AttributeError: 'module' object has no attribute 'MemoryDB'

>>>

I repeat, the exact same source works in both other computers!!! The module
"MemoryDB" exists, and is in the same subdir of the main script. It's
imported simply with "import MemoryDB".
The most strange thing is that if i "double-click" on the program's icon, it
still works correctly!
Anyone has some suggestion on how to run the program whitout leavin' the
IDLE on a Win ME system???

Thanks.

p.s. i have set a PYTHONPATH environment variable to c:\dati\python, and
added c:\python22 to the path in all the systems. However, this shouldn't be
necessary, right... ?





More information about the Python-list mailing list