crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

Unicode error using lmdb store type and Python 3.5 #954

Closed lucasvfventura closed 7 years ago

lucasvfventura commented 7 years ago

1) crossbar version output: Crossbar.io : 16.10.1 Autobahn : 0.17.1 (with JSON, MessagePack, CBOR, UBJSON) Twisted : 16.6.0-SelectReactor LMDB : 0.92/lmdb-0.9.18 Python : 3.5.2/CPython OS : Windows-7-6.1.7601-SP1 Machine : AMD64 Release key : RWQ2MDk26PKBMNUZG2Jok1tMBB1SKyci+N7dtcep8jrikTl4NvI1Rnux

2) Traceback: Replace my virtual environment directory path with {VIRTUAL_ENV_DIR} 2017-01-18T20:57:31-0800 [Router 15888] TypeError: Won't implicitly convert Unicode to bytes; use .encode(): Traceback (most recent call last): File "{VIRTUAL_ENV_DIR}\lib\site-packages\autobahn\wamp\protocol.py", line 871, in onMessage on_reply = txaio.as_future(endpoint.fn, *invoke_args, invoke_kwargs) File "{VIRTUAL_ENV_DIR}\lib\site-packages\txaio\tx.py", line 408, in as_future return maybeDeferred(fun, *args, *kwargs) File "{VIRTUAL_ENV_DIR}\lib\site-packages\twisted\internet\defer.py", line 150, in maybeDeferred result = f(args, kw) File "{VIRTUAL_ENV_DIR}\lib\site-packages\twisted\internet\defer.py", line 1445, in unwindGenerator return _inlineCallbacks(None, gen, Deferred()) --- --- File "{VIRTUAL_ENV_DIR}\lib\site-packages\twisted\internet\defer.py", line 1299, in _inlineCallbacks result = g.send(result) File "{VIRTUAL_ENV_DIR}\lib\site-packages\crossbar\worker\router.py", line 377, in start_router_realm router = self._router_factory.start_realm(rlm) File "{VIRTUAL_ENV_DIR}\lib\site-packages\crossbar\router\router.py", line 381, in start_realm store = LmdbRealmStore(store_config) File "{VIRTUAL_ENV_DIR}\lib\site-packages\crossbar\router\realmstore.py", line 340, in init self.event_store = LmdbEventStore(self._env) File "{VIRTUAL_ENV_DIR}\lib\site-packages\crossbar\router\realmstore.py", line 320, in init self._event_history = self._env.open_db('event-history') builtins.TypeError: Won't implicitly convert Unicode to bytes; use .encode()

2017-01-18T20:57:31-0800 [Controller 1268] wamp.error.runtime_error: Won't implicitly convert Unicode to bytes; use .encode()

3) default config.json with: "realms": [ { "name": "realm1", "roles": [ { "name": "anonymous", "permissions": [ { "uri": "", "match": "prefix", "allow": { "call": true, "register": true, "publish": true, "subscribe": true }, "disclose": { "caller": false, "publisher": false }, "cache": true } ] } ], "store": { "type": "lmdb", "dbfile": "data", "call-queue": [ { "uri": "com.nonrelevant", "match": "exact", "limit": 1000 } ] } } ]

oberstet commented 7 years ago

LMDB based call queues and event history store is not yet supported - sorry