Re: Threading error in WxPython ui

Eric Davis <[email protected]> Thu, 22 Dec 2005 11:33:37 -0500
Newsgroups gmane.comp.games.mud.client.lyntin
Message-ID <[email protected]>
Actually,

also put the line right after that:
	event.OutputEvent(message.Message("Lost connection to: %s\n" % 			 
self._host)).enqueue()
under the if statement.

so it should be:
     if not self._shutdownflag:
       self._config.change("mudecho", "on")

       # output message so the user knows what happened.
       event.OutputEvent(message.Message("Lost connection to: %s\n" % 
self._host)).enqueue()

Thanks again,
Eric

Eric Davis wrote:
> When using the wxpython ui, I sometimes get this error:
> 
> Exception in thread network (most likely raised during interpreter 
> shutdown):
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
>   File "/usr/lib/python2.4/threading.py", line 422, in run
>   File "/home/endavis/games/newmylyntin/lyntin41/lyntin/net.py", line 
> 420, in run
>   File "/home/endavis/games/newmylyntin/lyntin41/lyntin/config.py", line 
> 285, in change
>   File "/home/endavis/games/newmylyntin/lyntin41/lyntin/config.py", line 
> 95, in set
>   File "/home/endavis/games/newmylyntin/lyntin41/lyntin/config.py", line 
> 197, in check
> exceptions.AttributeError: 'NoneType' object has no attribute 
> 'convert_boolean'
> 
> Basically, this thread is being run after we have no engine object, I 
> changed line 420 in net.py to be these 2 lines:
> 
>     if not self._shutdownflag:
>         self._config.change("mudecho", "on")
> 
> It seems to have fixed the problem.
> 
> Thanks,
> Eric
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click