Skip to content

Conversation

@cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Feb 4, 2022

@wch not really related to this PR, but I'm not sure how/whether to fix this:

shiny run --reload examples.moduleapp.app
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [72330] using statreload
INFO:     Started server process [72332]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     127.0.0.1:61688 - "GET / HTTP/1.1" 200 OK
INFO:     127.0.0.1:61689 - "GET /lib/shiny-0.0.1/shiny.min.css HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:61688 - "GET /lib/jquery-3.6.0/jquery-3.6.0.min.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:61691 - "GET /lib/shiny-0.0.1/shiny.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:61697 - "GET /lib/bs3-compat-1.0/transition.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:61688 - "GET /lib/bs3-compat-1.0/tabs.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:61693 - "GET /lib/bootstrap-5.0.1/bootstrap.min.css HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:61695 - "GET /lib/bootstrap-5.0.1/bootstrap.bundle.min.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:61689 - "GET /lib/bs3-compat-1.0/bs3compat.js HTTP/1.1" 304 Not Modified
Exception in ASGI application
Traceback (most recent call last):
  File "/Users/cpsievert/opt/anaconda3/lib/python3.8/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 171, in run_asgi
    result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
  File "/Users/cpsievert/opt/anaconda3/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 59, in __call__
    return await self.app(scope, receive, send)
  File "./shiny/app.py", line 99, in __call__
    await self.starlette_app(scope, receive, send)
  File "/Users/cpsievert/opt/anaconda3/lib/python3.8/site-packages/starlette/applications.py", line 119, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/cpsievert/opt/anaconda3/lib/python3.8/site-packages/starlette/middleware/errors.py", line 146, in __call__
    await self.app(scope, receive, send)
  File "/Users/cpsievert/opt/anaconda3/lib/python3.8/site-packages/starlette/exceptions.py", line 63, in __call__
    await self.app(scope, receive, send)
  File "/Users/cpsievert/opt/anaconda3/lib/python3.8/site-packages/starlette/routing.py", line 659, in __call__
    await route.handle(scope, receive, send)
  File "/Users/cpsievert/opt/anaconda3/lib/python3.8/site-packages/starlette/routing.py", line 318, in handle
    await self.app(scope, receive, send)
  File "/Users/cpsievert/opt/anaconda3/lib/python3.8/site-packages/starlette/routing.py", line 77, in app
    await func(session)
  File "./shiny/app.py", line 151, in _on_connect_cb
    session = self.create_session(conn)
  File "./shiny/app.py", line 78, in create_session
    session = Session(self, id, conn, debug=self._debug)
  File "./shiny/session.py", line 149, in __init__
    self.app.server(self.input, self.output, self)
  File "./examples/moduleapp/app.py", line 43, in server
    counter_module.server("counter1")
  File "./shiny/shinymodule.py", line 91, in server
    session_proxy = SessionProxy(ns, session)
  File "./shiny/shinymodule.py", line 71, in __init__
    self.input: InputsProxy = InputsProxy(ns, parent_session.input)
  File "./shiny/shinymodule.py", line 20, in __init__
    self._ns: str = ns
  File "./shiny/shinymodule.py", line 38, in __setattr__
    super().__setattr__(attr, value)
  File "./shiny/session.py", line 567, in __setattr__
    self.__setitem__(attr, value)
  File "./shiny/shinymodule.py", line 27, in __setitem__
    self._values[self._ns_key(key)].set(value)
  File "./shiny/shinymodule.py", line 45, in __getattr__
    return object.__getattribute__(self, attr)
AttributeError: 'InputsProxy' object has no attribute '_values'

@cpsievert cpsievert requested a review from wch February 4, 2022 21:09
@wch
Copy link
Collaborator

wch commented Feb 4, 2022

Thanks for the heads up about modules. I'll fix it in a separate PR.

@wch wch mentioned this pull request Feb 4, 2022
@wch
Copy link
Collaborator

wch commented Feb 4, 2022

Looks good, but there are merge conflicts.

@cpsievert cpsievert merged commit 3de353e into main Feb 5, 2022
@cpsievert cpsievert deleted the ui-module branch February 5, 2022 16:06
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

Successfully merging this pull request may close these issues.

3 participants