ackwell / ninjabot

Ninjabot is not 'Just Another Bot'
10 stars 8 forks source link

Ninjabot instance has no attribute 'message_queue' #99

Closed icedingo closed 9 years ago

icedingo commented 10 years ago

While starting sometimes an exception is raised:

ninjabot-allmywut git:master ❯ python ninjabot.py                                                                  ✹ ✭
ninjabot starting up
ERROR DURING TASK EXECUTION Ninjabot instance has no attribute 'message_queue'
Writing storage to disk
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncore.py", line 411, in __getattr__
    retattr = getattr(self.socket, attr)
AttributeError: 'NoneType' object has no attribute 'message_queue'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nick/Python/ninjabot-allmywut/kronos.py", line 469, in threadedcall
    self.execute()
  File "/home/nick/Python/ninjabot-allmywut/kronos.py", line 314, in execute
    self.action(*self.args, **self.kw)
  File "ninjabot.py", line 229, in send_queue
    while not self.message_queue.empty():
  File "/usr/lib/python3.4/asyncore.py", line 414, in __getattr__
    %(self.__class__.__name__, attr))
AttributeError: Ninjabot instance has no attribute 'message_queue'
auscompgeek commented 10 years ago

I'm gonna laugh if this is another race condition.