plotly / dash-table

OBSOLETE: now part of https://github.com/plotly/dash
https://dash.plotly.com
MIT License
420 stars 72 forks source link

Update Werkzeug and add pyyaml #664

Closed wbrgss closed 4 years ago

wbrgss commented 4 years ago

When running npm run build in this repo, within a virtual environment:

  from .wrappers import Request
  File "/home/plotly/Workspace/dash-table/ve/lib/python3.7/site-packages/flask/wrappers.py", line 14, in <module>
  from werkzeug.wrappers.json import JSONMixin as _JSONMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.json'; 'werkzeug.wrappers' is not a package

Maybe we could also use a different version of Flask. In the end it might be a Flask bug (see here)

Traceback (most recent call last):
  File "/home/plotly/Workspace/dash-table/ve/bin/dash-generate-components", line 5, in <module>
    from dash.development.component_generator import cli
  File "/home/plotly/Workspace/dash-table/ve/lib/python3.7/site-packages/dash/development/component_generator.py", line 14, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'

I'm using PopOS (a flavour of Ubuntu 19.04). @Marc-Andre-Rivet can you check if bumping the Werkzeug version breaks anything in your env and/or whether pyyaml is already in your env?

alexcjohnson commented 4 years ago

@Marc-Andre-Rivet What is this requirements.txt file? The only place I see it mentioned is in the "local server review apps" section of CONTRIBUTING.md. For running npm run build I'd think you want to be in an environment that has dash[dev] installed, and that'll bring along PyYAML with it (and then after that reinstall the table repo -e).

Re: Werkzeug - I guess that should have been updated with Flask in https://github.com/plotly/dash-table/pull/536, but I don't know why this requirements.txt file is locking down things we don't depend on directly, that seems like a recipe for all sorts of problems, unless this file is autogenerated from some other clean install process

Marc-Andre-Rivet commented 4 years ago

@alexcjohnson I think this file is used for the Heroku deployment from GH: image

Not sure if dev-requirements and python-requirements have any use at this point though.

shammamah-zz commented 4 years ago

@wbrgss pyyaml should be installed automatically with pip install dash[dev]. We might have to update the contributing guidelines instead to specify that that package should be installed.

Marc-Andre-Rivet commented 4 years ago

Removing the pyyaml entry. As @shammamah pointed out this is included with dash[dev].