Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported operand types for str and int #1631

Closed
aRandomStranger opened this issue Jun 2, 2016 · 1 comment
Closed

Unsupported operand types for str and int #1631

aRandomStranger opened this issue Jun 2, 2016 · 1 comment

Comments

@aRandomStranger
Copy link

`Hi
['\n', '\x02', 'H', 'i']
[10, 2, 72, 105]
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/internal/python_message.py", line 1080, in MergeFromString
if self._InternalParse(serialized, 0, length) != length:
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/internal/python_message.py", line 1102, in InternalParse
(tag_bytes, new_pos) = local_ReadTag(buffer, pos)
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/internal/decoder.py", line 181, in ReadTag
while six.indexbytes(buffer, pos) & 0x80:
TypeError: unsupported operand type(s) for &: 'str' and 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/yowsup-cli", line 368, in
if not parser.process():
File "/usr/local/bin/yowsup-cli", line 270, in process
self.startEcho()
File "/usr/local/bin/yowsup-cli", line 308, in startEcho
stack.start()
File "/usr/local/lib/python3.4/dist-packages/yowsup/demos/echoclient/stack.py", line 21, in start
self.stack.loop()
File "/usr/local/lib/python3.4/dist-packages/yowsup/stacks/yowstack.py", line 196, in loop
asyncore.loop(_args, *_kwargs)
File "/usr/lib/python3.4/asyncore.py", line 208, in loop
poll_fun(timeout, map)
File "/usr/lib/python3.4/asyncore.py", line 153, in poll
read(obj)
File "/usr/lib/python3.4/asyncore.py", line 87, in read
obj.handle_error()
File "/usr/lib/python3.4/asyncore.py", line 83, in read
obj.handle_read_event()
File "/usr/lib/python3.4/asyncore.py", line 442, in handle_read_event
self.handle_read()
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/network/layer.py", line 102, in handle_read
self.receive(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/network/layer.py", line 110, in receive
self.toUpper(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/init.py", line 76, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 29, in receive
self.processReceived()
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 49, in processReceived
self.toUpper(oneMessageData)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/__init
.py", line 76, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/auth/layer_crypt.py", line 65, in receive
self.toUpper(payload)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/__init
.py", line 76, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/coder/layer.py", line 35, in receive
self.toUpper(node)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/__init
.py", line 76, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/logger/layer.py", line 14, in receive
self.toUpper(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/__init
.py", line 76, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/axolotl/layer_control.py", line 44, in receive
self.toUpper(protocolTreeNode)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/__init
.py", line 76, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/__init
.py", line 189, in receive
s.receive(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/axolotl/layer_receive.py", line 41, in receive
self.onMessage(protocolTreeNode)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/axolotl/layer_receive.py", line 74, in onMessage
self.handleEncMessage(protocolTreeNode)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/axolotl/layer_receive.py", line 86, in handleEncMessage
self.handlePreKeyWhisperMessage(node)
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/axolotl/layer_receive.py", line 129, in handlePreKeyWhisperMessage
self.parseAndHandleMessageProto(pkMessageProtocolEntity, plaintext[:-padding])
File "/usr/local/lib/python3.4/dist-packages/yowsup/layers/axolotl/layer_receive.py", line 171, in parseAndHandleMessageProto
m.ParseFromString(serializedData)
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/message.py", line 185, in ParseFromString
self.MergeFromString(serialized)
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/internal/python_message.py", line 1086, in MergeFromString
raise message_mod.DecodeError('Truncated message.')
google.protobuf.message.DecodeError: Truncated message.`

So i got this error today while trying to start the yowsup-cli and while trying to message the Bot. Any ideas?

@drencrom
Copy link
Contributor

drencrom commented Jun 8, 2016

Duplicate of #1613

@tgalal tgalal closed this as completed May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants