Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore RenderFunction, RenderFunctionSync, and RenderFunctionAsync #1003

Closed
karangattu opened this issue Jan 12, 2024 · 3 comments · Fixed by #1023
Closed

Restore RenderFunction, RenderFunctionSync, and RenderFunctionAsync #1003

karangattu opened this issue Jan 12, 2024 · 3 comments · Fixed by #1023
Assignees
Milestone

Comments

@karangattu
Copy link
Collaborator

Find the stack-trace below

E           RuntimeError: Shiny app exited without ever becoming ready. Waiting for 'Uvicorn running on' in stderr. Last 20 lines of stderr:
E               self.loaded_app = import_from_string(self.app)
E           
E             File "/Users/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/uvicorn/importer.py", line 24, in import_from_string
E           
E               raise exc from None
E           
E             File "/Users/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
E           
E               module = importlib.import_module(module_str)
E           
E             File "/Users/user/.pyenv/versions/3.10.12/lib/python3.10/importlib/__init__.py", line 126, in import_module
E           
E               return _bootstrap._gcd_import(name[level:], package, level)
E           
E             File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
E           
E             File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
E           
E             File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
E           
E             File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
E           
E             File "<frozen importlib._bootstrap_external>", line 883, in exec_module
E           
E             File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
E           
E             File "/Users/user/Documents/GitHub/py-shiny/shiny/api-examples/data_frame/app.py", line 4, in <module>
E           
E               from shinywidgets import output_widget, render_widget
E           
E             File "/Users/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/shinywidgets/__init__.py", line 8, in <module>
E           
E               from ._shinywidgets import output_widget, reactive_read, register_widget, render_widget, as_widget
E           
E             File "/Users/user/.pyenv/versions/3.10.12/lib/python3.10/site-packages/shinywidgets/_shinywidgets.py", line 33, in <module>
E           
E               from shiny.render import RenderFunction, RenderFunctionAsync
E           
E           ImportError: cannot import name 'RenderFunction' from 'shiny.render' (/Users/user/Documents/GitHub/py-shiny/shiny/render/__init__.py)

while running data_frame/app.py
Shinywidgets is importing RenderFunction and RenderFunctionAsync

@cpsievert
Copy link
Collaborator

This should get fixed as a part of posit-dev/py-shinywidgets#119

That said, I suppose this is problematic if folks upgrade shiny and not shinywidgets.

@schloerke how painful would it be to have better back-compat support? Also, I think we need to at least mention the removal of RenderFunction, RenderFunctionAsync as a breaking change?

@schloerke
Copy link
Collaborator

@cpsievert Yes, we'll need to put it back. I caught that with @karangattu last Friday.

@schloerke schloerke changed the title Error running example apps Restore RenderFunction, RenderFunctionSync, and RenderFunctionAsync Jan 16, 2024
@schloerke schloerke added this to the v0.7.0 milestone Jan 16, 2024
schloerke added a commit that referenced this issue Jan 17, 2024
…and render.{RenderFunction, RenderFunctionAsync}

Fixes #1003
@schloerke
Copy link
Collaborator

The classes will be hard deprecated in #1032, however the error message will be much clearer on how to move forward

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 a pull request may close this issue.

3 participants