Hi, I’m trying to add basic dash authentication following this tutotrial
And upon doing so getting the following error locally:
Traceback (most recent call last):
File “index.py”, line 13, in
from appc import app, server
File “C:\Users\USER\Desktop\Folder\SubFolder\appc.py”, line 31, in
APP_URL
File “C:\Users\USER\Anaconda3\lib\site-packages\dash_auth\plotly_auth.py”, line 37, in init
salt=app_name
File “C:\Users\USER\Anaconda3\lib\site-packages\dash_auth\oauth.py”, line 24, in init
Auth.init(self, app)
File “C:\Users\USER\Anaconda3\lib\site-packages\dash_auth\auth.py”, line 10, in init
self._index_view_name = app.config[‘routes_pathname_prefix’]
TypeError: ‘type’ object is not subscriptable
Please note that without authentication my web app runs locally and on Heroku without an issue.
It’s a multipaged app so i’ve segmented it into different files.
index.py
imports 'app'
and 'server'
from appc.py
file.
Traceback (most recent call last):
File “index.py”, line 13, in
from appc import app, server
File “C:\Users\USER\Desktop\Folder\SubFolder\appc.py”, line 31, in
APP_URL
File “C:\Users\USER\Anaconda3\lib\site-packages\dash_auth\plotly_auth.py”, line 37, in init
salt=app_name
File “C:\Users\USER\Anaconda3\lib\site-packages\dash_auth\oauth.py”, line 24, in init
Auth.init(self, app)
File “C:\Users\USER\Anaconda3\lib\site-packages\dash_auth\auth.py”, line 10, in init
self._index_view_name = app.config[‘routes_pathname_prefix’]
TypeError: ‘type’ object is not subscriptable
Above error is seen on trying to use PlotlyAuth authentication method.
Versions:
dash 0.21.0
dash-auth 1.0.0
dash-core-components 0.13.0rc4
dash-html-components 0.10.0
dash-renderer 0.12.1
dash-table-experiments 0.6.0
dash.ly 0.17.3
Not sure if this is a bug or not.
Any help appreciated.
Thanks