plotly / dash-alternative-viz

Dash components & demos to create Altair, Matplotlib, Highcharts , and Bokeh graphs within Dash apps.
https://dash.plotly.com
MIT License
7 stars 1 forks source link

Unable to reproduce the output of usage.py #5

Open andins opened 3 years ago

andins commented 3 years ago

I run the usage.py file but the bokeh graphics is missing from the output. There is also an import error in the downloaded script it tries to import plotly_express instead of plotly.express. Once this is solved it runs without errors but doesn't show the bokeh figure (I'm interested in this to have bokeh dealing with graphics inside a dash app). The only output at terminal is:

dash-alternative-viz-master/usage.py:122: UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail.
  fig, ax = plt.subplots()
WARNING: QApplication was not created in the main() thread.

I'm using dash 1.14.0, bokeh 2.2.3, holoviews 1.13.5.

urig commented 3 years ago

Almost a year later, I can confirm the issue still exists. Using Python 3.9.5 on Windows 10. :|

If this issue is suitable for a first time contributor, I'd love to give it a try. Any pointers on how this can be resolved? 🙏🏻

urig commented 3 years ago

Seeing as the warning is coming from line 122 which is part of the seaborn_fig() function I expect it to be unrelated to the Bokeh issue. This is strengthens by my having removed the call to seaborn_fig() from usage.py which resulted in the warning going away.

A more interesting hint is a set of warnings visible in the browser developer tools console. Including:

[bokeh] JS/Python version mismatch [bokeh] Library versions: JS (1.4.0) / Python (2.4.1)

alexcjohnson commented 3 years ago

@urig @andins this repo was created as a proof-of-concept of basic integration with other viz libraries, but TBH having not seen all that much community interest in it, nor any significant use cases for our internal projects we haven't developed it further or maintained it.

That said you can see there isn't all that much code here, so fixing this should be fairly easy - we'd happily help you if you're interested in making a PR to fix it.

urig commented 3 years ago

@alexcjohnson many thanks for the prompt reply! I'd love to help and am working on a PR but I'm unsure of how to proceed.

I think the first step would be to upgrade Bokeh JS to match the Bokeh Python library. Things I've tried without success:

  1. Upgrading to "@bokeh/bokehjs": "^2.4.0" in root package.json and running npm install.
  2. Likewise in package.json under dash_alternative_viz and running npm install.
  3. Overwriting assets/bokeh.min.css with v2.4.0 contents I've found online (not sure I did this well).

Would greatly appreciate a bit of direction. 🙏🏻

nicolaskruchten commented 2 years ago

This proof of concept repo was created a number of years ago and may simply not be compatible with the latest versions of these libraries at this point.