Rpyc server crash

32 views
Skip to first unread message

PyScripter

unread,
Dec 26, 2009, 9:00:18 PM12/26/09
to rpyc
Start an Rpyc server and from a python prompt issue the following
commands:

>> import rpyc
>> c = rpyc.classic.connect("localhost")
>> c.execute("import wx")
>> c.eval("wx.cvar")

The server crashes. Apparently this has to do with the boxing/
unboxing of wx.cvar. Any chance of handling such cases more
gracefully?

Thanks.

PyScripter

unread,
Dec 27, 2009, 5:53:24 PM12/27/09
to rpyc
Some analysis suggests the following:

The problem occurs in Connection._unbox:
cls = getattr(obj, "__class__", type(obj))

wx.cvar.__class__ raises a NameError and not an AttributeError as it
should (this is a bug on wx's part). As a result _unbox fails.

The workaround which would make rpyc more forgiving to such bugs would
be to replace the getattr statement with the following:

try:
cls = obj.__class__
except:
cls = type(obj)


Could you please implement this small change?

tomer filiba

unread,
Dec 28, 2009, 3:46:37 PM12/28/09
to rp...@googlegroups.com
i'm glad you were able to diagnose the problem, but i'm afraid it's not something that will get into rpyc.
the short answer is, i'm too busy at least until the end of the semester.
the longer answer is, it's a slippery slope -- i will not include patches that fix bugs in third party products, or the list will never end.

there are two solutions:
1) patch wxwindows (or monkey-pacth them, if possible)
2) patch rpyc and include the patched version with pyscripter

if you wish, i can let you use the project's repo on github (on a side branch)


hope this helps, although it's not much. i'm just overbook until february.
-tomer


An NCO and a Gentleman
Reply all
Reply to author
Forward
0 new messages