Closed K4CZP3R closed 8 years ago
You have to go to /usr/lib/python2.7/
and open the file asyncore.py
In the file, find the line 199 and change def loop(timeout=30.0, use_poll=False, map=None, count=None):
to def loop(timeout=30.0, use_poll=True, map=None , count=None):
No, it doesn't work
It fixed the issue for me for the Bad file descriptor
But then I have an AssertionError:msg
:
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 270, in handleWhisperMessage
encMessageProtocolEntity = EncryptedMessageProtocolEntity.fromProtocolTreeNode(node)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/protocolentities/message_encrypted.py", line 53, in fromProtocolTreeNode
encNode.data.encode('latin-1') if sys.version_info >= (3,0) else encNode.data)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/protocolentities/message_encrypted.py", line 24, in setEncProps
assert encType in "pkmsg", "msg"
AssertionError: msg
@alafanechere so, for you groups messages doesn't work too??
I've found https://github.com/tgalal/yowsup/issues/898, this issue is about AsserationError: msg but I can't find solution. https://github.com/tgalal/yowsup/issues/931 this too
Yes I am in the same situation exactly.
Its due apparently to a new group message encryption skmsg
that yowsup seems to have some trouble to handle right now...
I am trying to edit the code to avoid the Assertion Error
and ignore the message.
Would be happy to hear from you if you succeed in solving this.
For @montemarcaldera are group messages working :o
I'm going to reinstall everything, and try it
Guys, IT W O R K S!
I just reinstalled my system and installed
sudo apt-get install python-dateutil sudo apt-get install python-setuptools sudo apt-get install python-dev sudo apt-get install libevent-dev sudo apt-get install ncurses-dev
git clone git://github.com/tgalal/yowsup.git
and this https://pypi.python.org/pypi/protobuf/2.6.1 and pycrypto
If you want help, cookiemonsterkg@o2.pl on Skype
Thanks it worked again for me with a bit of fine tuning. I still encounter crash when the bot receives several messages in a row:
AuthError("Unhandled stream:error node:\n%s" % node)
AuthError: Unhandled stream:error node:
<stream:error>
<xml-not-well-formed>
</xml-not-well-formed>
</stream:error>
@alafanechere #34
@K4CZP3R @alafanechere Did you manage to reverse the problem? I had this issue in a random group, tried to reinstall and everything, but no success.. What exactly did you do? Thanks!
@montemarcaldera , merged PR. Sorry for taking so long...
For me, it works fine https://github.com/tgalal/yowsup/pull/1336
I'm doing everything on Raspberry Pi. I reinstalled OS and installed everything one more time but I didn't change environment to android
Well, Yowsup is ignoring my messages only via group chat.
AssertionError: msg
Edit: I tried to reinstall everything but it doesn't work :(
Did you changed environment? Dont do this ;)
still crashing for me:
rror: (9, 'Bad file descriptor')
server.py [INFO][2016-03-15 15:58:42,092] Restarting..
server.py [INFO][2016-03-15 15:58:42,092] ################
server.py [INFO][2016-03-15 15:58:42,092] Server s
95864
server.py [INFO][2016-03-15 15:58:42,093] ################
server.py [ERROR][2016-03-15 15:58:42,093] Unexpected Exce
Traceback (most recent call last):
File "src/server.py", line 38, in start
self.stack.loop(timeout=0.5, discrete=0.5)
File "build/bdist.linux-x86_64/egg/yowsup/stacks/yowstack.py",
asyncore.loop(_args, *_kwargs)
File "/usr/lib/python2.7/asyncore.py", line 216, in loop
poll_fun(timeout, map)
File "/usr/lib/python2.7/asyncore.py", line 145, in poll
r, w, e = select.select(r, w, e, timeout)
error: (9, 'Bad file descriptor')
server.py [INFO][2016-03-15 15:58:42,093] Restarting..
server.py [INFO][2016-03-15 15:58:42,093] ################
Traceback (most recent call last):
File "src/server.py", line 55, in
server.start()
File "src/server.py", line 35, in start
logging.info("#" * 50)
File "/usr/lib/python2.7/logging/init.py", line 1614, in i
root.info(msg, _args, *_kwargs)
File "/usr/lib/python2.7/logging/init.py", line 1152, in i
self.log(INFO, msg, args, **kwargs)
File "/usr/lib/python2.7/logging/init.py", line 1271, in
self.handle(record)
File "/usr/lib/python2.7/logging/init.py", line 1281, in h
self.callHandlers(record)
File "/usr/lib/python2.7/logging/init.py", line 1321, in c
hdlr.handle(record)
File "/usr/lib/python2.7/logging/init.py", line 749, in ha
self.emit(record)
File "/usr/lib/python2.7/logging/init.py", line 872, in em
stream.write(fs % msg)
KeyboardInterrupt
@e0xify You have to go to /usr/lib/python2.7/
and open the file asyncore.py
In the file, find the line 199 and change def loop(timeout=30.0, use_poll=False, map=None, count=None):
to def loop(timeout=30.0, use_poll=True, map=None, count=None):
@K4CZP3R Ok, i'll try
Edit: I'm still having AssertionError: msg
Did this before but then i got another error something like child Attribute missing..
Will post the log tomorrow
Just added a Dockerfile, that includes all dependencies and also patches with the above correction. If you have already docker installed, it is the most easy and reliable way to run the bot.
Hi, When I add my bot to group and I send normal text message it throws this: http://pastebin.com/tuY7geWC.
How can i fix this?