nicegui: Unable to update elements on Posit Connect
Description
Requirements.txt
nicegui==1.4.36
openpyxl==3.0.10
pyodbc==5.1.0
rsconnect-python==1.20.0
sqlparse==0.4.4
ipython==8.14.0
thefuzz==0.22.1
Minimal example:
from fastapi import FastAPI, Request
from fastapi.responses import FileResponse, RedirectResponse
from nicegui import app, ui, run, Client
fast_app = FastAPI()
@ui.page('/', title="Account Pull", response_timeout=240)
def page_layout():
l = ui.label("Hello World")
def test():
l.text = "Pineapple"
l.update()
ui.button("Test", on_click=test)
ui.run_with(fast_app, storage_secret="secret")
In my local version the word changes to pineapple as expected, but on posit the word does not change. It seems the .update function isn’t working possibly? I am unsure as there are no errors thrown and nothing in the logs. I have spent about 3 hours googling and trying to debug this, I am hoping I am missing something obvious.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (6 by maintainers)
I have tried CONNECT_STRICT_ASGI. When set to true it throws errors. I can grab the error log for that if thought necessary. I ment FastAPI 0.108.x, I do not rely on 0.108.x I would like to upgrade to the latest version but in order to do that I need to upgrade nicegui which is where the problem is stemming from. I am trying to update my project to the latest version of Nicegui.
I have not tried updating to 2.0.1, I will do that and report back if anything changes.