HTTP Bridge Callee url unicode errors

#1

Hello,

I’m attempting to the set up the HTTP Bridge Callee and getting this error with presumably the HTTP URL that the callee is trying to reach. The url in the config JSON file, when parsed by the JSON parser, looks like it isn’t being encoded in UTF-8.

2016-06-15T23:46:22+0000 [Container 9600] TypeError: url must be bytes, not unicode: Traceback (most recent call last):

File “/usr/local/lib/python2.7/dist-packages/autobahn/wamp/protocol.py”, line 809, in onMessage

on_reply = txaio.as_future(endpoint.fn, *invoke_args, **invoke_kwargs)

File “/usr/local/lib/python2.7/dist-packages/txaio/tx.py”, line 408, in as_future

return maybeDeferred(fun, *args, **kwargs)

File “/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py”, line 150, in maybeDeferred

result = f(*args, **kw)

File “/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py”, line 1274, in unwindGenerator

return _inlineCallbacks(None, gen, Deferred())

— —

File “/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py”, line 1128, in _inlineCallbacks

result = g.send(result)

File “/usr/local/lib/python2.7/dist-packages/crossbar/adapter/rest/callee.py”, line 69, in on_call

params=params

File “/usr/local/lib/python2.7/dist-packages/treq/api.py”, line 97, in request

return _client(**kwargs).request(method, url, **kwargs)

File “/usr/local/lib/python2.7/dist-packages/treq/client.py”, line 175, in request

bodyProducer=bodyProducer)

File “/usr/local/lib/python2.7/dist-packages/twisted/web/client.py”, line 1918, in request

deferred = self._agent.request(method, uri, headers, bodyProducer)

File “/usr/local/lib/python2.7/dist-packages/twisted/web/client.py”, line 1986, in request

deferred = self._agent.request(method, uri, headers, bodyProducer)

File “/usr/local/lib/python2.7/dist-packages/twisted/web/client.py”, line 1592, in request

parsedURI = URI.fromBytes(uri)

File “/usr/local/lib/python2.7/dist-packages/twisted/web/client.py”, line 629, in fromBytes

scheme, netloc, path, params, query, fragment = http.urlparse(uri)

File “/usr/local/lib/python2.7/dist-packages/twisted/web/http.py”, line 169, in urlparse

raise TypeError("url must be bytes, not unicode")

exceptions.TypeError: url must be bytes, not unicode

This looks very similar to this treq bug filed and still open in Github: https://github.com/twisted/treq/issues/54.

Are people working around this bug somehow?

For reference, I’ve attached the config.json file that I’m using and just running ‘crossbar start’.

Thanks,

~ Jeff

config.json (3.24 KB)

0 Likes