Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flask-Login app: No layout in module pages.login in dash.page_registry #1

Open
etjkai opened this issue Jul 21, 2022 · 12 comments
Open

Comments

@etjkai
Copy link

etjkai commented Jul 21, 2022

Hi AnnMarie, running the multi_page_flask_login app example results in an error

dash.exceptions.NoLayoutException: No layout in module pages.login in dash.page_registry

Just highlighting in case you'd like to change it.

@AnnMarieW
Copy link
Owner

AnnMarieW commented Jul 21, 2022

Hi @etjkai Thanks for reporting, but I can't duplicate the error. I ran it just now with both dash 2.5.1 and dash 2.6.0 and they both work just like it appears in the gif in the README.

Could you send me a link to a minimal example that duplicates the error you are seeing? What version of flask and flask_login are you using?

@etjkai
Copy link
Author

etjkai commented Jul 21, 2022

I've cloned directly from the git repo, and ran app.py from the folder. I've checked, and it seems like my dash version is 2.6.0 too.

Just to check the version of the code, it's still the one with a typo in the subfolder - multi_page_fask_login right?

image

@AnnMarieW
Copy link
Owner

AnnMarieW commented Jul 21, 2022

I just cloned the repo, created an new venv and installed the requirements.txt and it worked fine.
Did you do the pip install python-dotenv as recommended in the error message?

And thanks for pointing out the typo in the folder name - I just fixed that 🙃

@etjkai
Copy link
Author

etjkai commented Jul 21, 2022

Yepp I did have python-dotenv installed. I did the exact same steps as you, with a fresh venv, but the same error persists...

It's very strange, as other examples, e.g. multi_page_basics work as intended.

@AnnMarieW
Copy link
Owner

Here's what I get when I do pip list:
Do you have anything different?

async-timeout 4.0.2
Brotli 1.0.9
click 8.1.3
dash 2.5.1
dash-bootstrap-components 1.2.0
dash-bootstrap-templates 1.0.5
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-iconify 0.1.2
dash-labs 1.1.0
dash-mantine-components 0.10.2
dash-table 5.0.0
Deprecated 1.2.13
diskcache 5.2.1
Flask 2.1.3
Flask-Caching 1.10.1
Flask-Compress 1.12
Flask-Login 0.6.1
importlib-metadata 4.12.0
importlib-resources 5.8.0
itsdangerous 2.1.2
Jinja2 3.1.2
ldap3 2.9.1
MarkupSafe 2.1.1
numpy 1.23.1
packaging 21.3
pandas 1.4.3
pip 20.0.2
pkg-resources 0.0.0
plotly 5.9.0
pyasn1 0.4.8
pyparsing 3.0.9
python-dateutil 2.8.2
python-dotenv 0.20.0
pytz 2022.1
redis 4.3.4
setuptools 44.0.0
six 1.16.0
tenacity 8.0.1
Werkzeug 2.1.2
wrapt 1.14.1
zipp 3.8.1

@etjkai
Copy link
Author

etjkai commented Jul 21, 2022

I've

  • colorama==0.4.5
  • dash==2.6.0

and do not have

  • pkg-resources 0.0.0

All the rest are the same versions.

@AnnMarieW
Copy link
Owner

well, I'd love to help, but I'm not sure how without being able to duplicate the error.

@etjkai
Copy link
Author

etjkai commented Jul 21, 2022

Not an issue! Perplexing to me too, as I'm indeed seeing the layout in page.login right in front of me. Thanks anyway - much appreciated.

@AnnMarieW
Copy link
Owner

hmm - are you on Windows?

@etjkai
Copy link
Author

etjkai commented Jul 21, 2022

Yepp - I happen to be!

@AnnMarieW
Copy link
Owner

AnnMarieW commented Jul 21, 2022

ok, just had someone else on Windows try it and they got the same error. I don't know the fix yet, but it's a clue.

@etjkai
Copy link
Author

etjkai commented Jul 21, 2022

Great! Let me know if I could help in any way - I'd be glad to 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants