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

Recommended Answers

All 9 Replies

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

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

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

Your welcome... Hopefully it didn't take too long to find it :)

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!

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'

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

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 !

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.