yowsup icon indicating copy to clipboard operation
yowsup copied to clipboard

unhandled <stream:error> exception

Open kepeto opened this issue 12 years ago • 3 comments

hi,

is there any ways how to catch the unhandled exception?

from example i use this simple method to start client

try:
  wa = WhatsappListenerClient()
  wa.login(login, password)
except Exception, e:
  print("Exception: %s") % str(e)

but i cannot catch this following error / exception, no onDisconnect event is trigered

ReaderThread: Waiting, time to die: T-150 seconds
ReaderThread: Waiting, time to die: T-120 seconds
BinTreeNodeReader:     Incoming
BinTreeNodeReader:
<stream:error>
<ack>
</ack>
</stream:error>

Exception in thread Thread-682:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/Yowsup/connectionmanager.py", line 896, in run
    except FatalStreamErrorException, e:
NameError: global name 'FatalStreamErrorException' is not defined

kepeto avatar May 25 '14 13:05 kepeto

if you created new exception type you must define it first

CODeRUS avatar May 25 '14 14:05 CODeRUS

@CODeRUS

i don't define new exception, it seems FatalStreamErrorException is from pulled source that i merge with tgalal source.

on my side stream error is very annoying, i cannot catch because after this error showed up the client is stuck (doesn't sent disconnected signal)

<stream:error>
<ack>
</ack>
</stream:error>

kepeto avatar May 25 '14 14:05 kepeto

I've dealt it this way: #1535

sattva1 avatar Apr 27 '16 02:04 sattva1