AttributeError: ('Read-only: can only be set in the Dash constructor or during init_app()', 'requests_pathname_prefix')


When I run my script, I am obtaining “AttributeError: (‘Read-only: can only be set in the Dash constructor or during init_app()’, ‘requests_pathname_prefix’)”.

Can anyone help?

Thank you

Hi @Oladayo

How are you setting the requests_pathname_prefix ?

You can get that error if it’s not inside the Dash constructor like this:

app= dash.Dash(__name__,  requests_pathname_prefix= "/abc/123")

Hi @AnnMarieW ,

I don’t have requests_pathname_prefix in my script.

app = JupyterDash(name,external_stylesheets=[dbc.themes.DARKLY])

There is double underscore before ‘name’ It’s getting formatted into bold in my reply.

Hmm, I haven’t used JupyterDash, so if anyone else knows the answer, please jump in.

Is it just with this script, or is it with everthing?

everything actually. Even those script that has run successfully previously.

Seems some people are experiencing same issues as seen on stack overflow;

@Oladayo - It looks like a problem with the latest release. For now, could you please try to use the previous version?

pip install dash==2.0.0

I just noticed this has already been reported - you can track the progress on Github: Dash does not properly work with library called jupyter_dash [BUG] · Issue #1907 · plotly/dash · GitHub

1 Like


I did the

pip install dash==2.0.0

Then changed

app = JupyterDash( name ,external_stylesheets=[dbc.themes.DARKLY])


app = dash.Dash(name,external_stylesheets=[dbc.themes.DARKLY])

some script are running fine for now.

Ok, but if you are using app=dash.Dash(...) then dash==2.0.1 will work fine.

It’s just a problem with JupyterDash and the latest release. Note - this issue is being worked on now, so I expect there will be fix soon.



thank you for your help

1 Like

working fine now.

It seems they fixed it.

1 Like

@Oladayo I’m still facing the same issue though. Did you downgrade Dash to < 2.1.0 for it to work again?


I initially downgrade to dash==2.0.0 and changed the

app=JupyterDash() to


some script ran fine while some didn’t.

After a while, I just re-installed jupyter_dash and dash without specifying the version and then it worked fine.


They fixed the issue