1

Hi I am getting this error

AttributeError: 'module' object has no attribute 'instancemethod'

I searched through the forum and found answers for this error, but it is not working in my case. I am using python 2.6 and wxpython 2.8. The program which where running perfectly earlier are also showing this error now. Please help me I am stuck.

here is the traceback

Traceback (most recent call last):
File "C:\Documents and Settings\SMStudent\Desktop\rect.py", line 1, in <module>
import wx
File "C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 45, in <module>
from wx._core import *
File "C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 6, in <module>
new_instancemethod = new.instancemethod
AttributeError: 'module' object has no attribute 'instancemethod'

Thanks

5
Contributors
9
Replies
39
Views
7 Years
Discussion Span
Last Post by soibac
0

Check your directory for python files (could be hidden) called "new"! Also check for folders... If you found any you have to rename them :)

ALSO CHECK FOR HIDDEN FILES AND FILES IN:

Your python-path (mine is C:\Python).

Edited by need help!: n/a

0

Also check for imports called new? If all fails post us your code...

Edited by need help!: n/a

0

Hey that worked.. I renamed the fille NEW..Thanks a bunch!! :)

0

Hi...am a new to pythan dbus..how to solve for AttributeError: 'module' object has no attribute 'Object'.plz tell me..

Editor's note:
Start your own thread with the appropriate title!
Hijacking someone's unrelated thread is bad!

Edited by vegaseat: n/a

0

Hello. Sorry for repost and bad english.

I searched all files and directories but only got: new.py in C:\Python27\Lib.

I tried to rename it to: NEW.py but it didn't solve the erro. Please help!

File "C:\Python27\lib\site-packages\pygraphviz\graphviz.py", line 9, in <modul
>
new_instancemethod = new.instancemethod
ttributeError: 'module' object has no attribute 'instancemethod'

0

Hi, I found the solution :P
That is my error because of creating new.py in my working dir.

0

That is my error because of creating new.py in my working dir.

DONT rename the standard library modules ! Also in windows, you can use a small app locate 32 to find files named new.py !

Edited by Gribouillis

0

Thanks! I am new to Python. Sometime, I created files with the same name as standard library :3

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.