question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Receiving "error loading dependencies" message; actual problem is unclear

See original GitHub issue

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:

2017-09-01_152848

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”?

Thanks for taking a look.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:8
  • Comments:53 (9 by maintainers)

github_iconTop GitHub Comments

28reactions
jasper-mullercommented, 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.

4reactions
DBCerigocommented, Mar 28, 2018

Just for anyone else googling out there: Another possible cause for the error might be that you have a circular cycle in your set of callbacks i.e. callbacks that trigger themselves in a loop (embarrassing…). Check JS console for something like Error: Dependency Cycle Found:....

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error loading dependencies in chrome browser, when ...
1. I ran this code fine in chrome. Dash is known to Cache a lot of things. Try deleting all your cache &...
Read more >
Developers - Receiving "error loading dependencies" message
Receiving "error loading dependencies" message; actual problem is unclear.
Read more >
Getting "Error loading dependencies" error when having an ...
Your problem is different. You have a callback that has an INPUT that exists in the initial layout. So what happens? It triggers...
Read more >
Error Codes | Yarn - Package Manager
The author of packageA can fix this problem by adding a peer dependency on packagePeer . If relevant, they can use optional peer...
Read more >
Troubleshooting Common Errors - Gatsby
A likely problem is that the operating system you are running locally is different than the one where your site is deployed. Oftentimes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found