I am trying to deploy an example shiny-for-python app on a linux server with shiny-server, but I keep getting the following error message:
su: ignoring --preserve-environment, it's mutually exclusive with --login
Using Python 3.11.5 at /srv/shiny-server/Test/.venv/bin/python
Traceback (most recent call last):
File "/opt/shiny-server/python/SockJSAdapter.py", line 220, in <module>
run()
File "/opt/shiny-server/python/SockJSAdapter.py", line 213, in run
app = getattr(app_module, "app")
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'app' has no attribute 'app'
As the error messages refers to a module in shiny-server, I think my virtual environment should be set up correctly.
The app I'm trying to deploy consists of the following code:
OK, I somehow got around.
My speculation is that shiny-server isn't yet adapted to shiny express.
Most of the simplest examples on the Posit playground have been rewritten from classic python shiny to shiny express. So also the example we've all tried.
Rewriting to the classic formulation (where you need to specify app_ui, server and app solved the problem.
Posit: Please include a super-simple py-shiny-classic example on the playground