vuer icon indicating copy to clipboard operation
vuer copied to clipboard

URDF example seems broken

Open wuphilipp opened this issue 7 months ago • 0 comments

When trying the example on the README.md I get this error.

from vuer import Vuer, VuerSession
from vuer.schemas import DefaultScene, Urdf

app = Vuer()


@app.spawn(start=True)
async def main(session: VuerSession):
    app.set @ DefaultScene(
        Urdf("assets/urdf/robotiq.urdf"),
    )

    while True:
        await session.sleep(0.1)
Traceback (most recent call last):
  File "/home/philipp/miniconda/lib/python3.9/site-packages/vuer/server.py", line 579, in handler
    raise e
  File "/home/philipp/miniconda/lib/python3.9/site-packages/vuer/server.py", line 575, in handler
    await self.socket_handler(vuer_proxy)
  File "/home/philipp/hi.py", line 9, in main
    app.set @ DefaultScene(
  File "/home/philipp/miniconda/lib/python3.9/site-packages/waterbear/waterbear.py", line 171, in __getattr__
    raise AttributeError("attribute {} does not exist on {}".format(item, __d))
AttributeError: attribute set does not exist on {'_prefix': None, 'name': 'vuer', 'domain': 'https://vuer.ai/', 'port': 8012, 'free_port': True, 'static_root': '.', 'queue_len': 100, 'cors': 'https://vuer.ai/,https://dash.ml/,http://localhost:8000/,http://127.0.0.1:8000/,*', 'queries': {}, 'cert': None, 'key': None, 'ca_cert': None, 'client_root': PosixPath('/home/philipp/miniconda/lib/python3.9/site-packages/vuer/client_build'), 'device': 'cuda', 'host': 'localhost', 'WEBSOCKET_MAX_SIZE': 268435456, 'REQUEST_MAX_SIZE': 268435456, 'app': <Application 0x7fb7d6fb6f40>, 'cors_context': <aiohttp_cors.cors_config.CorsConfig object at 0x7fb7d6fb6e50>, 'handlers': defaultdict(<class 'dict'>, {}), 'page': <[vuer.schemas.html_components.Page](http://vuer.schemas.html_components.page/) object at 0x7fb7d6fb6f10>, 'ws': {UUID('96c7dd59-544d-463d-b14e-ce4dc0496697'): <WebSocketResponse Switching Protocols GET / >}, 'socket_handler': <function main at 0x7fb7d6fb1940>, 'spawned_coroutines': []}
websocket is connected. id:3a6d44da-057d-46e5-ad09-869c3789f7af
default socket worker is up, adding clientEvents
Uplink task running. id:3a6d44da-057d-46e5-ad09-869c3789f7af
uplink:3a6d44da-057d-46e5-ad09-869c3789f7af is not in websocket pool
websocket is now disconnected. Removing the socket.
WebSocket connection closed
Task exception was never retrieved
future: <Task finished name='Task-271' coro=<Vuer.downlink.<locals>.handler() done, defined at /home/philipp/miniconda/lib/python3.9/site-packages/vuer/server.py:573> exception=AttributeError("attribute set does not exist on {'_prefix': None, 'name': 'vuer', 'domain': 'https://vuer.ai/', 'port': 8012, 'free_port': True, 'static_root': '.', 'queue_len': 100, 'cors': 'https://vuer.ai/,https://dash.ml/,http://localhost:8000/,http://127.0.0.1:8000/,*', 'queries': {}, 'cert': None, 'key': None, 'ca_cert': None, 'client_root': PosixPath('/home/philipp/miniconda/lib/python3.9/site-packages/vuer/client_build'), 'device': 'cuda', 'host': 'localhost', 'WEBSOCKET_MAX_SIZE': 268435456, 'REQUEST_MAX_SIZE': 268435456, 'app': <Application 0x7fb7d6fb6f40>, 'cors_context': <aiohttp_cors.cors_config.CorsConfig object at 0x7fb7d6fb6e50>, 'handlers': defaultdict(<class 'dict'>, {}), 'page': <[vuer.schemas.html_components.Page](http://vuer.schemas.html_components.page/) object at 0x7fb7d6fb6f10>, 'ws': {UUID('3a6d44da-057d-46e5-ad09-869c3789f7af'): <WebSocketResponse Switching Protocols GET / >}, 'socket_handler': <function main at 0x7fb7d6fb1940>, 'spawned_coroutines': []}")>
Traceback (most recent call last):
  File "/home/philipp/miniconda/lib/python3.9/site-packages/waterbear/waterbear.py", line 156, in __getattr__
    value = self.__d[item]
KeyError: 'set'

During handling of the above exception, another exception occurred:

Tried on both Mac, python=3.11 and Ubuntu, python=3.9

This is what is visualized: image

wuphilipp avatar Jul 20 '24 01:07 wuphilipp