When i try to update requests_pathname_prefix
or routes_pathname_prefix
in dash v2.6.1, I get this error: AttributeError: (‘Read-only: can only be set in the Dash constructor or during init_app()’).
I would like to update these configurations via code like this (I know I could just set them in dash.Dash(), this is just a simplistic and my real code i need to init app and then update the config):
app = dash.Dash()
# Do Stuff
runurl = environment['runurl']
app.config.update({
'routes_pathname_prefix': runurl,
'requests_pathname_prefix': runurl
})
Deleting these from app.config._read_only
does work as an alternative, but it is annoying to have to do this:
del app.config._read_only['requests_pathname_prefix']
del app.config._read_only['routes_pathname_prefix']
But that doesn’t work. Very annoying. I see threads and github issues where this is claimed to be fixed, but those typically refer to JupyterDash. Is that so?