AttributeError: "'NoneType' object has no attribute 'CHANNEL_CLOSE'
I was getting a few of those
AttributeErrors and was finally able to narrow it down to the
Message object being None in the Channel.del method.
The full error is:
Exception AttributeError: "'NoneType' object has no attribute 'CHANNEL_CLOSE'" in <bound method Channel.__del__ of <Channel id=3 open>> ignored
After changing to make sure that Message was not None, I was no longer able to get the errors back:
if Message is not None: if self._items is None: # has_callback msgcode = Message.CHANNEL_LAST_MESSAGE else: msgcode = Message.CHANNEL_CLOSE try: self.gateway._send(msgcode, self.id) except (IOError, ValueError): # ignore problems with sending pass
I am not sure though if this is the correct approach for the problem, or why is it in the first place that
Message can be