Hi,
I am working on a project which uses wxPython and RPy, and have run
into a bit of a problem. RPy, rpy.sourceforge.net, provides a Python
interface to the R statistical system, r-project.org.
If I run the listed three line program, using any of the wxPython
import statements I get the listed error message. However, it doesn't
happen everytime. Sometimes I can run the program 100's of times
before it fails.
I am running Python 2.2.3 under Debian woody with rpy-0.3.1, r-1.8.1
and wxPython-2.4.1.2.
RPy and wxPython seem to run fine separately and I can't seem to
replicate the problem under XP.
Many thanks for any help!
--Dave
import rpy
#import wxPython.wx
#from wxPython.wx import *
import wx
print "DONE"
Unhandled exception in thread:
Traceback (most recent call last):
File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 429, in __bootstrap
self.__stop()
File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 438, in __stop
self.__block.notifyAll()
File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 242, in notifyAll
self.notify(len(self.__waiters))
File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 224, in notify
me = currentThread()
TypeError: 'NoneType' object is not callable
import rpy
#import wxPython.wx
#from wxPython.wx import *
import wx
print "DONE"
Have you tried importing wxPython before importing RPy? It sounds as if
RPy is starting a thread upon import, which may be screwing up wxPython
(or vice-versa).
···
On Thu, 2003-08-14 at 10:57, David J. Neu wrote:
Unhandled exception in thread:
Traceback (most recent call last):
File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 429, in __bootstrap
self.__stop()
File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 438, in __stop
self.__block.notifyAll()
File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 242, in notifyAll
self.notify(len(self.__waiters))
File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 224, in notify
me = currentThread()
TypeError: 'NoneType' object is not callable
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 (800) 735-0555
Cliff,
Thanks for the suggestion ... now it craps out everytime, not
sporadically. This has got to be useful info for debugging, but I
haven't tracked it done yet.
Thanks again,
--Dave
···
On Thu, Aug 14, 2003 at 11:13:19AM -0700, Cliff Wells wrote:
On Thu, 2003-08-14 at 10:57, David J. Neu wrote:
> import rpy
> #import wxPython.wx
> #from wxPython.wx import *
> import wx
> print "DONE"
Have you tried importing wxPython before importing RPy? It sounds as if
RPy is starting a thread upon import, which may be screwing up wxPython
(or vice-versa).
> Unhandled exception in thread:
> Traceback (most recent call last):
> File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 429, in __bootstrap
> self.__stop()
> File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 438, in __stop
> self.__block.notifyAll()
> File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 242, in notifyAll
> self.notify(len(self.__waiters))
> File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 224, in notify
> me = currentThread()
> TypeError: 'NoneType' object is not callable
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 (800) 735-0555
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
Hi,
For those who might be interested in using RPy and wxPython together,
it appears the problem can be solved by either calling
rpy.stop_r_eventloop() immediately following importing rpy and before
importing wxPython:
import rpy
rpy.stop_r_eventloop()
import wx
OR
by editing
python-2.2.3/lib/python2.2/site-packages/rpy.py
and commenting out the line:
rpy.stop_r_eventloop()
which is line 113 in rpy-0.3.1.
Cheers,
Dave
···
On Thu, Aug 14, 2003 at 02:54:45PM -0400, David J. Neu wrote:
Cliff,
Thanks for the suggestion ... now it craps out everytime, not
sporadically. This has got to be useful info for debugging, but I
haven't tracked it done yet.
Thanks again,
--Dave
On Thu, Aug 14, 2003 at 11:13:19AM -0700, Cliff Wells wrote:
> On Thu, 2003-08-14 at 10:57, David J. Neu wrote:
>
> > import rpy
> > #import wxPython.wx
> > #from wxPython.wx import *
> > import wx
> > print "DONE"
>
> Have you tried importing wxPython before importing RPy? It sounds as if
> RPy is starting a thread upon import, which may be screwing up wxPython
> (or vice-versa).
>
> > Unhandled exception in thread:
> > Traceback (most recent call last):
> > File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 429, in __bootstrap
> > self.__stop()
> > File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 438, in __stop
> > self.__block.notifyAll()
> > File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 242, in notifyAll
> > self.notify(len(self.__waiters))
> > File "/home/djneu/tools/python-2.2.3/lib/python2.2/threading.py", line 224, in notify
> > me = currentThread()
> > TypeError: 'NoneType' object is not callable
>
>
> --
> Cliff Wells, Software Engineer
> Logiplex Corporation (www.logiplex.net)
> (503) 978-6726 (800) 735-0555
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org