You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Receiving "error loading dependencies" message; actual problem is unclear #125
Here is a minimal example after doing some trial and error to pin it down:
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import dash
import dash_core_components as dcc
import dash_html_components as html
def generate_inputs():
in_a_lab = html.Label('input a')
in_a = dcc.Input(type='number',
value=1)
in_b = [html.Label(html.Strong('input b')),
dcc.Input(type='number', value=1)]
inputs = [in_a_lab, in_a]
# uncomment this line to cause error
# inputs = [in_a_lab, in_a, in_b]
return inputs
app = dash.Dash()
app.layout = html.Div([
# switch the comment on these lines to cause an error
html.Div(generate_inputs())
# generate_inputs()
]) # app.layout
if __name__ == '__main__':
app.run_server(debug=True)
I started on the path of python3, but ran into some dependency hell on Ubuntu 16.04, so I reinstalled with python2. This created what I believe to be some actual dependency issues around urllib3 and chardet. I was getting dependency warnings about the wrong versions on the command line when I would do python2 app.py.
With those solved, the command line looked fine, but I'd get this in the browser:
I was in the process of building some ui elements and doing them in pairs, with a label and then matching input. Then I wanted to switch to a list of the label and pair together. I realized I was sending back a nested list (the above would generated something like [in_a_lab, in_a, [in_b_lab, in_b]]). So, that was a definite issue, but I wouldn't expect the result to be error loading dependencies.
On accident I found that without wrapping the function return in html.Div() I'm also getting the same error.
This is probably an issue on my part with something I don't understand about dash (totally likely; I'm all of 2-3 hours into playing with it). That said, if this is isn't really a "dependency error," might there be room improving the error message? From what I'm seeing, this strikes me as more of a syntax error, or something like "expected blah object, got blah instead"?
Yeah, this is a really bad error message. In fact, dependencies in this case doesn't even refer to the python dependencies, it refers to an underling /_dash-dependencies API endpoint... 🤕
I'm embarrassed to say that it turned out to be my ad blocker that was causing the problem.
Disabling ad block solved my issue.
Reacted by Maximiliano Lira Del Canto, Peter Phillips, Tomáš Havlík, Manuel Garrido, Code4SAFrankie, Moritz Brückner, deepakpatil7421, feldon0606, Ryan Marren, Krishnang Dalal and 4 more
Reacted by Code4SAFrankie, Moritz Brückner, Daniel, feldon0606, Ryan Marren, Prasad Ovhal, Louis Gerard, adhi003hn, Pedro Vitor Abreu, Jordi Perreman and 3 more
I do get the same error every once in a while. It is not reproducible in my case as it suddenly starts/stops working without changing the code or anything. I first thought it is a browser problem as it initially happened only on Firefox and Chrome was fine. Happens on Chrome now too.
@abieler and @jasper-muller did you try my example above? I'm curious if it reproduces for either of you, or if it's possibly an ad blocker (which I also use) or sporadic/browser related.
In my experience, it was reproducible by toggling the called out comment lines.
I have been running into the same issue while trying to follow the tutorial at . I am using virtualenv with Python 3 and I have install only the libraries required by Dash. I have tried to run from the same environment the example from and it works fine. So I believe, when I run python usage.py that the error loading dependencies message occurs when loading my example component (straight from the archetype, v0.2.11). Is there a way to do a quick fix that would enable me to load my custom component dependency ?
I realized I was sending back a nested list (the above would generated something like [in_a_lab, in_a, [in_b_lab, in_b]]). So, that was a definite issue, but I wouldn't expect the result to be error loading dependencies.
and
That said, if this is isn't really a "dependency error," might there be room improving the error message?
This issue is about what I see as some sort of "blanket" error message that isn't accurate or very helpful in debugging. So, yes, I passed a nested list. "Error loading dependencies" had very little chance in helping me find that out (being new).
I brought this issue forward so that the developers who know the internals of dash might be able to send back a message that more accurately describes what's wrong.
Reacted by Andre Bieler, Lucas Sinclair and Artificer
@abieler It's all good, and I actually forgot why I wanted you to replicate... I was noting that @jasper-muller found the issue related to adblock, and you said it was sporadic. I just wanted to make sure this wasn't on my end, as I wasn't experiencing it as sporadic. Thanks!
Wanted to follow-up that I think I'm having an issue similar to @jmineraud in that I'm trying to follow this tutorial to create a custom component and run it within a multi-page app. Unfortunately, I'm getting the "Error loading dependencies" message. I've made sure to include the component in app.layout to ensure that Dash sees it when looking for depencies and to avoid the known issue.
Unfortunately, I'm getting the "Error loading dependencies" message. I've made sure to include the component in app.layout to ensure that Dash sees it when looking for depencies and to avoid the known issue.
Are there any errors in the console? Do you have a github repo that we can use to try to replicate the issue? Are you serving the assets locally with app.scripts.config.serve_locally=True?
Reacted by Tucker Gordon, Abhinav Kumar, Juri, jessieolough and temofy
@alexcjohnson @soerendip ok, that's starting to make sense. The complicating factor here is that I did actually setup a clean environment and the only thing I installed was dash, with conda create -n dash python=3.8 dash. The only condition specified here is python must be 3.8, so unless dash doesn't support 3.8 (?!) then there is a problem with the dependencies in the conda environment, at least for macOS if nothing else. Possibly this needs to be another issue? Should I open a new issue on here, or perhaps on the conda-forge repo?
Back to the issue at hand, I found another issue suggesting you are looking for examples of how "error loading dependencies" can appear. Should I open a seperate issue and list how to cause it as I have here with the todo list example?
@Keou0007 I'm not familiar with conda, but you might have to dig into the intricacies of how it sources libraries. If I do pip install and something already exists, it will use the installed version unless I pass --upgrade, which will prompt a check to the repos to see if there's a newer version.
Your pip freeze is outdated as well, including a pointer to a possibly custom build at some point? I wonder if conda just took what you already had.
Again, no familiarity with conda, but it also stands out to me that some libs above have py_38 and all the dash related ones have py_0, which almost makes me think "default" or "already installed" vs. being specific to your python=38 flag.
Looks like the issue is old versions of core-components, html-components and table in the anaconda main repo. If I update using conda-forge I get all the newest versions. This means the problem will solve itself in time, but in the shorter term I see two possible solutions to the issue I hit (i.e. docs examples not working with not much indication of why):
Push newer versions of the supporting packages to anaconda main repo. Is this even possible or out of your hands?
Update the pattern matching docs page to specify required versions of the dependencies to avoid a situation where someone like me is seeing that they have the required version but it still isn't working and not knowing why.
I could probably put together a PR for option 2 myself, but it would be more work for me than someone who already has a local fork setup for such things.
@jwhendy my understanding is that py_0 version means it's python version independent. conda packages are built before distribution (unlike pip installs that are built on the local system after installation from source) and so some packages will be built for a specific python version and conda will contain a different build of those packages for each python version, hence py38 specific packages in some cases. In other cases, where it doesn't matter so much, conda will only hold one version which can be used to install against any python version. Similarly, conda builds are OS specific, so this issue of old versions on the main repo may only occur on macOS. I will test on linux next time I'm logged in to my work machine.
Thanks for digging into this @Keou0007 - In the pip world all these packages are version-locked, so you have to work pretty hard to get incompatible versions. But it looks like the situation is more complicated with conda.
Long-term, I think the solution will be to actually get rid of the dash-renderer package altogether, just merge it into the main dash package. That way there's no way the two can get out of sync. It already lives in the same repo in GitHub... We originally kept them separate in order to ensure the architecture had a clear front-end / back-end break, looking ahead to different back-end languages, but in practice these other back ends just grab the final renderer JS bundle, and that doesn't depend on this being a separate Python package.
In fact we've even discussed folding dash-core-components, dash-html-components, and dash-table into dash So that there wold be only one "core dash" package. We avoided that before for two reasons: (1) to ensure components were decoupled from the framework itself, in particular to make it easier to add more components, (2) so that if you aren't using a given component package, your page doesn't need to load its JS. But (1) has outlived its usefulness as there are tons of other component packages out there, and (2) is no longer a big deal since we have async loading, so initially you only load a small stub for each package.
If we only had one package, there wouldn't be anything to go wrong in conda - as soon as they include a new version of dash all the rest comes along for the ride.
Not sure if you saw the conversation on the dash-feedstock page I posted, but I was wrong about conda-forge feeding into the anaconda main repo. Looks like the next thing would be to post an issue with anaconda and tell them they need to version lock the dash package in the main repo with its dependencies, matching the version locking that occurs for pip (which is replicated in the conda-forge feedstock). I think for now I've done my dash here though (haha), I can solve my issue by using the conda-forge version so I'll leave the rest to the experts.
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson
Activity
chriddyp commentedon Sep 4, 2017
Yeah, this is a really bad error message. In fact,
dependenciesin this case doesn't even refer to the python dependencies, it refers to an underling/_dash-dependenciesAPI endpoint... 🤕jasper-muller commentedon Sep 22, 2017
Got the same issue here. Installed dash using
Next, I followed the scatterplot example in the getting started guide: https://plot.ly/dash/getting-started
Which results in the following output in my terminal:
And in my browser:

I'm running this from a virtual environment with the following packages installed:
jasper-muller commentedon Sep 22, 2017
I'm embarrassed to say that it turned out to be my ad blocker that was causing the problem.
Disabling ad block solved my issue.
abieler commentedon Oct 2, 2017
I do get the same error every once in a while. It is not reproducible in my case as it suddenly starts/stops working without changing the code or anything. I first thought it is a browser problem as it initially happened only on Firefox and Chrome was fine. Happens on Chrome now too.
jwhendy commentedon Oct 2, 2017
@abieler and @jasper-muller did you try my example above? I'm curious if it reproduces for either of you, or if it's possibly an ad blocker (which I also use) or sporadic/browser related.
In my experience, it was reproducible by toggling the called out comment lines.
jmineraud commentedon Oct 3, 2017
I have been running into the same issue while trying to follow the tutorial at . I am using virtualenv with Python 3 and I have install only the libraries required by Dash. I have tried to run from the same environment the example from and it works fine. So I believe, when I run
python usage.pythat the error loading dependencies message occurs when loading my example component (straight from the archetype, v0.2.11). Is there a way to do a quick fix that would enable me to load my custom component dependency ?jmineraud commentedon Oct 3, 2017
I would like to add that
npm run demoseems to work finejasper-muller commentedon Oct 4, 2017
@jwhendy tried your example and get the same error as you are getting:
Error loading dependencies.abieler commentedon Oct 4, 2017
@jwhendy the issue is how you stack your input lists.
Doing
works for me.
In your solution
inputsis a nested list, where with this one here it is a plain list.That said, the error message is not ideal.
jwhendy commentedon Oct 4, 2017
@abieler Agreed. Note this from my original post:
and
This issue is about what I see as some sort of "blanket" error message that isn't accurate or very helpful in debugging. So, yes, I passed a nested list. "Error loading dependencies" had very little chance in helping me find that out (being new).
I brought this issue forward so that the developers who know the internals of
dashmight be able to send back a message that more accurately describes what's wrong.abieler commentedon Oct 5, 2017
lol thats what I get for not reading through the whole post :)
jwhendy commentedon Oct 5, 2017
@abieler It's all good, and I actually forgot why I wanted you to replicate... I was noting that @jasper-muller found the issue related to adblock, and you said it was sporadic. I just wanted to make sure this wasn't on my end, as I wasn't experiencing it as sporadic. Thanks!
astratis commentedon Jan 15, 2018
Not an optimal solution but worked for me after installing again dash, hope it helps.
tuckergordon commentedon Jan 22, 2018
Wanted to follow-up that I think I'm having an issue similar to @jmineraud in that I'm trying to follow this tutorial to create a custom component and run it within a multi-page app. Unfortunately, I'm getting the "Error loading dependencies" message. I've made sure to include the component in app.layout to ensure that Dash sees it when looking for depencies and to avoid the known issue.
Any ideas as to what could be going wrong?
chriddyp commentedon Jan 23, 2018
Are there any errors in the console? Do you have a github repo that we can use to try to replicate the issue? Are you serving the assets locally with
app.scripts.config.serve_locally=True?31 remaining items
Keou0007 commentedon Oct 27, 2020
@alexcjohnson @soerendip ok, that's starting to make sense. The complicating factor here is that I did actually setup a clean environment and the only thing I installed was dash, with
conda create -n dash python=3.8 dash. The only condition specified here is python must be 3.8, so unless dash doesn't support 3.8 (?!) then there is a problem with the dependencies in the conda environment, at least for macOS if nothing else. Possibly this needs to be another issue? Should I open a new issue on here, or perhaps on the conda-forge repo?Back to the issue at hand, I found another issue suggesting you are looking for examples of how "error loading dependencies" can appear. Should I open a seperate issue and list how to cause it as I have here with the todo list example?
jwhendy commentedon Oct 27, 2020
@Keou0007 I'm not familiar with conda, but you might have to dig into the intricacies of how it sources libraries. If I do
pip installand something already exists, it will use the installed version unless I pass--upgrade, which will prompt a check to the repos to see if there's a newer version.Your
pip freezeis outdated as well, including a pointer to a possibly custom build at some point? I wonder if conda just took what you already had.Again, no familiarity with conda, but it also stands out to me that some libs above have
py_38and all thedashrelated ones havepy_0, which almost makes me think "default" or "already installed" vs. being specific to yourpython=38flag.Keou0007 commentedon Oct 27, 2020
Looks like the issue is old versions of core-components, html-components and table in the anaconda main repo. If I update using conda-forge I get all the newest versions. This means the problem will solve itself in time, but in the shorter term I see two possible solutions to the issue I hit (i.e. docs examples not working with not much indication of why):
I could probably put together a PR for option 2 myself, but it would be more work for me than someone who already has a local fork setup for such things.
Keou0007 commentedon Oct 27, 2020
@jwhendy my understanding is that py_0 version means it's python version independent. conda packages are built before distribution (unlike pip installs that are built on the local system after installation from source) and so some packages will be built for a specific python version and conda will contain a different build of those packages for each python version, hence py38 specific packages in some cases. In other cases, where it doesn't matter so much, conda will only hold one version which can be used to install against any python version. Similarly, conda builds are OS specific, so this issue of old versions on the main repo may only occur on macOS. I will test on linux next time I'm logged in to my work machine.
Keou0007 commentedon Oct 27, 2020
I got motivated: https://github.com/plotly/dash-docs/pull/1003
Same issue with old packages in anaconda main repo exists on Linux also.
alexcjohnson commentedon Oct 28, 2020
Thanks for digging into this @Keou0007 - In the
pipworld all these packages are version-locked, so you have to work pretty hard to get incompatible versions. But it looks like the situation is more complicated withconda.Long-term, I think the solution will be to actually get rid of the
dash-rendererpackage altogether, just merge it into the maindashpackage. That way there's no way the two can get out of sync. It already lives in the same repo in GitHub... We originally kept them separate in order to ensure the architecture had a clear front-end / back-end break, looking ahead to different back-end languages, but in practice these other back ends just grab the final renderer JS bundle, and that doesn't depend on this being a separate Python package.In fact we've even discussed folding
dash-core-components,dash-html-components, anddash-tableintodashSo that there wold be only one "core dash" package. We avoided that before for two reasons: (1) to ensure components were decoupled from the framework itself, in particular to make it easier to add more components, (2) so that if you aren't using a given component package, your page doesn't need to load its JS. But (1) has outlived its usefulness as there are tons of other component packages out there, and (2) is no longer a big deal since we have async loading, so initially you only load a small stub for each package.If we only had one package, there wouldn't be anything to go wrong in
conda- as soon as they include a new version ofdashall the rest comes along for the ride.Keou0007 commentedon Oct 29, 2020
Not sure if you saw the conversation on the dash-feedstock page I posted, but I was wrong about conda-forge feeding into the anaconda main repo. Looks like the next thing would be to post an issue with anaconda and tell them they need to version lock the dash package in the main repo with its dependencies, matching the version locking that occurs for pip (which is replicated in the conda-forge feedstock). I think for now I've done my dash here though (haha), I can solve my issue by using the conda-forge version so I'll leave the rest to the experts.
Develop (plotly#133)
3.1 issue132 readonly tests (plotly#134)
Develop (#133)
3.1 issue132 readonly tests (#134)
gvwilson commentedon Jun 3, 2024
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson