Hi,
With Dash I have created an app which is running on windows IIS (wfastcgi) on a local network with some clients. This was working fine untill I changed the app.
I removed a few components, for example a html.Div "text_input_div"
. After uploading the new code and preforming a iisreset
command .
I am getting the following error message in the logfile:
ERROR : 2022-03-21 19:29:35,201: app.py : log_exception >>> Exception on /_dash-update-component [POST]
Traceback (most recent call last):
File "C:\Python310\lib\site-packages\dash\dash.py", line 1297, in dispatch
cb = self.callback_map[output]
KeyError: 'text_input_div.style'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Python310\lib\site-packages\flask\app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "C:\Python310\lib\site-packages\flask\app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Python310\lib\site-packages\flask\app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Python310\lib\site-packages\flask\app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "C:\Python310\lib\site-packages\dash\dash.py", line 1335, in dispatch
raise KeyError(msg.format(output)) from missing_callback_function
KeyError: "Callback function not found for output 'text_input_div.style', perhaps you forgot to prepend the '@'?"
Component "text_input_div"
does not exist anymore, and there is no callback referring to this component.
App layout:
- app.py
- apps
|-- init.py
|-- app1.py
|-- app2.py - modals
|-- init.py
|-- modal1.py → previous file with"text_input_div"
called by app1
|-- modal2.py
Why do I get this error?
Is iisreset
the correct way to reset the app after copying the new code to the app-folder?
Is one of the clients (the webpage is running all day) having the "text_input_div"
in memory?
The app is working with no errors in the IDE.
Kind Regards