plotly / dash-table-experiments

NO LONGER SUPPORTED - use https://github.com/plotly/dash-table instead
MIT License
174 stars 57 forks source link

Unable to run usage.py : No such file for bundle.js #62

Closed QCTW closed 6 years ago

QCTW commented 6 years ago

Hi,

I am playing around this beautiful work of dash table and when I try to access the web produced by the example code: usage.py, I have the following error:

I had installed : dash, dash-renderer, dash-html-components, dash-core-components. What package is missing to have the result display? It seems to be a missing Javascript?

Thank you

 * Running on http://127.0.0.1:8050/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 294-429-851
127.0.0.1 - - [05/Apr/2018 19:23:45] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [05/Apr/2018 19:23:45] "GET /_dash-component-suites/dash_renderer/react@15.4.2.min.js?v=0.12.1 HTTP/1.1" 200 -
127.0.0.1 - - [05/Apr/2018 19:23:45] "GET /_dash-component-suites/dash_renderer/react-dom@15.4.2.min.js?v=0.12.1 HTTP/1.1" 200 -
127.0.0.1 - - [05/Apr/2018 19:23:45] "GET /_dash-component-suites/dash_html_components/bundle.js?v=0.10.0 HTTP/1.1" 200 -
127.0.0.1 - - [05/Apr/2018 19:23:45] "GET /_dash-component-suites/dash_table_experiments/bundle.js?v=0.6.0 HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1997, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.5/dist-packages/dash/dash.py", line 289, in serve_component_suites
    pkgutil.get_data(package_name, path_in_package_dist),
  File "/usr/lib/python3.5/pkgutil.py", line 629, in get_data
    return loader.get_data(resource_name)
  File "<frozen importlib._bootstrap_external>", line 818, in get_data

FileNotFoundError: [Errno 2] No such file or directory: '/home/dev-rahma/Workspace/dash-table-experiments/dash_table_experiments/bundle.js'
127.0.0.1 - - [05/Apr/2018 19:23:45] "GET /_dash-component-suites/dash_core_components/plotly-1.35.2.min.js?v=0.22.0 HTTP/1.1" 200 -
127.0.0.1 - - [05/Apr/2018 19:23:45] "GET /_dash-component-suites/dash_core_components/bundle.js?v=0.22.0 HTTP/1.1" 200 -
127.0.0.1 - - [05/Apr/2018 19:23:45] "GET /_dash-component-suites/dash_renderer/bundle.js?v=0.12.1 HTTP/1.1" 200 -
127.0.0.1 - - [05/Apr/2018 19:23:46] "GET /_dash-layout HTTP/1.1" 200 -
127.0.0.1 - - [05/Apr/2018 19:23:46] "GET /_dash-dependencies HTTP/1.1" 200 -
127.0.0.1 - - [05/Apr/2018 19:23:46] "POST /_dash-update-component HTTP/1.1" 200 -
ned2 commented 6 years ago

That JavaScript file comes from dash_table_experiments but I would have thought for your app to be calling it from the front end, you must have already installed it. Perhaps double check that you have it installed and at the latest version: pip install -U dash_table_experiments.

If it's still not working, you could also try again using the CDN-hosted versions of the JavaScript assets by removing the line app.scripts.config.serve_locally = True (which it looks like you've got set).

QCTW commented 6 years ago

Hi Ned,

Thanks for the reply. After comment out the line app.scripts.config.serve_locally = True in the sample code usage.py , it works on localhost web!

Thank you.