Closed creuzige closed 2 years ago
Is dash_unload_component in the .yml file on your local filesystem? (And when the gsas environment is activated, and you run 'conda list', do you see 'dash_unload_component'?
I only ask because the above are true for mine and the app seems to run smoothly :|
It is in the .yml file, but does not show up in the conda list.
My guess is then that the conda environment was not built correctly from the .yml file. If the --update doesn't work, perhaps try recreating the conda environment?
conda env remove -n gsas-AustCalc
conda env create -f conda_gsas_env.yml
(You could also 'cheat' and just do >> pip install dash_unload_component )
@dnewton600 Well, I think that issue was caused by my computer having multiple environments called the same thing. So that part is resolved. But now I get a different error:
(gsas-AustCalc) PN118888:app creuzige$ python app.py
Traceback (most recent call last):
File "app.py", line 16, in <module>
from dash_extensions.snippets import send_file
File "/Users/creuzige/gsas2full/envs/gsas-AustCalc/lib/python3.7/site-packages/dash_extensions/snippets.py", line 7, in <module>
from dash import html, Output, Input, callback_context
ImportError: cannot import name 'Output' from 'dash' (/Users/creuzige/gsas2full/envs/gsas-AustCalc/lib/python3.7/site-packages/dash/__init__.py)
Maybe try pulling again from GitHub? In the app.py file 'Output' is imported from dash.dependencies, not dash, so maybe the local app.py file is out of date with the dash version?
Edit: Whoops, sorry, the error is in snippets.py so my comment isn't relevant :) This could be a fun thing to debug during our meeting!
When I check GitHub and the file, they both say dash.dependencies; but I agree the error doesn't say that...
Yeah, probably something to debug later...
If I do 'conda list' I see I have dash version 2.6.0 and dash-extensions 0.0.71. I wonder if the dash-extensions version in your environment is an earlier version (in which Output was imported from 'dash')?
Looks like I have dash 2.0.0 and dash-extensions 0.0.71
I assume it must be some update from the dash version. If you are in the environment and you start a python shell with
python
And then type
from dash import Output
I suspect it might throw an error, whereas somewhere along the way to 2.6.0 they added Output to the init.py file...
If this is the case we should probably specify the dash version in the .yml file
Solved when updating to dash 2.6.0. I also needed to change my conda channel, this version was not listed in the default channel.
Pulled the latest commit (ecbf784) and tried to run the app, but got a "ModuleNotFoundError: No module named 'dash_unload_component' " error. I tried updating my conda environment, thinking that might be the issue but no luck...
Any ideas?