|
From: klo uo <kl...@gm...> - 2013-05-25 20:15:02
|
Ah, right. There was indeed new.pyc file in folder I was working in. Thanks On Sat, May 25, 2013 at 9:47 PM, Christoph Gohlke <cg...@uc...> wrote: > On 5/25/2013 12:37 PM, klo uo wrote: > > Out of the blue, I started getting this messages while plotting with MPL > > 1.2.1: > > > > ======================================== > > Traceback (most recent call last): > > File > > "C:\Python27\lib\site-packages\matplotlib\backends\backend_qt4.py", line > > 244, in mouseMoveEvent > > FigureCanvasBase.motion_notify_event( self, x, y ) > > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", > > line 1724, in motion_notify_event > > self.callbacks.process(s, event) > > File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 343, > > in process > > proxy(*args, **kwargs) > > File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 215, > > in __call__ > > mtd = new.instancemethod(self.func, self.inst(), self.klass) > > AttributeError: 'module' object has no attribute 'instancemethod' > > ======================================== > > > > I didn't install any new package or change my Python installation in any > > way, which makes this hard for me to solve. The message appears when I > > move my mouse pointer inside plot window. I first removed matplotlibrc > > from my "home" folder, and it happens again regardless backend changed > > this way from wx to tk (which is default). I set backend to qt4 also, > > but it's just the same. > > > > Any ideas? > > > > There is likely a `new` module in sys.path that shadows Python's builtin > new module. Add a `import new;print(new.__file__)` statement at the top > of your script. It should output 'X:\\Python27\\lib\\new.pyc' > > Christoph > > |