getting strange error since 0.11.1

45 views
Skip to first unread message

Greg Keys

unread,
Feb 1, 2016, 7:17:15 PM2/1/16
to Crossbar
2016-02-01T23:31:41+0000 [Router         11] Unhandled Error
Traceback (most recent call last):
  File "/root/python2711/lib/python2.7/site-packages/twisted/python/log.py", line 101, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/root/python2711/lib/python2.7/site-packages/twisted/python/log.py", line 84, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/root/python2711/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/root/python2711/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/root/python2711/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 597, in _doReadOrWri
    why = selectable.doRead()
  File "/root/python2711/lib/python2.7/site-packages/twisted/internet/tcp.py", line 209, in doRead
    return self._dataReceived(data)
  File "/root/python2711/lib/python2.7/site-packages/twisted/internet/tcp.py", line 215, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/root/python2711/lib/python2.7/site-packages/twisted/protocols/tls.py", line 422, in dataReceived
    self._flushReceiveBIO()
  File "/root/python2711/lib/python2.7/site-packages/twisted/protocols/tls.py", line 392, in _flushReceiveBIO
    ProtocolWrapper.dataReceived(self, bytes)
  File "/root/python2711/lib/python2.7/site-packages/twisted/protocols/policies.py", line 120, in dataReceived
    self.wrappedProtocol.dataReceived(data)
  File "/root/python2711/lib/python2.7/site-packages/autobahn/twisted/websocket.py", line 134, in dataReceived
    self._dataReceived(data)
  File "/root/python2711/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 1179, in _dataRecei
    self.consumeData()
  File "/root/python2711/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 1191, in consumeDat
    while self.processData() and self.state != WebSocketProtocol.STATE_CLOSED:
  File "/root/python2711/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 1558, in processDat
    fr = self.onFrameEnd()
  File "/root/python2711/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 1650, in onFrameEnd
    self.processControlFrame()
  File "/root/python2711/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 1703, in processCon
    if self.onCloseFrame(code, reasonRaw):
  File "/root/python2711/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 762, in onCloseFram
    self.sendCloseFrame(code=code, reasonUtf8=self.remoteCloseReason, isReply=True)
  File "/root/python2711/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 1910, in sendCloseF
    payload += reasonUtf8
exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 1: ordinal not in range(128)

Not sure when this started exactly but I think it started when autobahn updated from 0.10.x

Alexander Gödde

unread,
Feb 5, 2016, 8:13:31 AM2/5/16
to Crossbar
Hi Greg, 

there have been quite a few changes & cleanup around unicode strings recently with Crossbar.io & AutobahnPython (part of supporting more features on Python 3).

Could you try with the latest releases of both and see whether this problem still persists?

Regards,

Alex

Greg Keys

unread,
Feb 7, 2016, 9:40:15 PM2/7/16
to Crossbar
This error still exists on 0.12.1 of crossbar and autobahn using python 2.7.11

Alexander Gödde

unread,
Feb 8, 2016, 4:04:15 AM2/8/16
to Crossbar
OK, handed this off to hawkowl to take a look at. She should be getting back to you soon.

Tobias Oberstein

unread,
Feb 11, 2016, 6:27:58 PM2/11/16
to cross...@googlegroups.com
Hi Greg,

internal handling of unicode/bytes has gotten much more strict (
formerly, we did some "auto coercing" of bytes to unicode).

Could you try with trunk again, since I just committed a (I believe) fix
for your issue:

https://github.com/crossbario/autobahn-python/commit/69b0517a8e0adec60fb1784446c8aae91dd45be0

(I think the trigger might be a client closing the WebSocket connection
with a reason that is Unicode)

Cheers,
/Tobias
> --
> You received this message because you are subscribed to the Google
> Groups "Crossbar" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to crossbario+...@googlegroups.com
> <mailto:crossbario+...@googlegroups.com>.
> To post to this group, send email to cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/crossbario/9fdae5be-1ad7-4206-ae7b-5da105fc7f22%40googlegroups.com
> <https://groups.google.com/d/msgid/crossbario/9fdae5be-1ad7-4206-ae7b-5da105fc7f22%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Tobias Oberstein

unread,
Feb 11, 2016, 6:30:23 PM2/11/16
to Crossbar
forgot: pls retry with AutobahnPython trunk that is .. Crossbar.io isn't the bad guy here ..
Reply all
Reply to author
Forward
0 new messages