dash-alternative-viz icon indicating copy to clipboard operation
dash-alternative-viz copied to clipboard

Unable to reproduce the output of usage.py

Open andins opened this issue 5 years ago • 5 comments

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.

andins avatar Nov 26 '20 11:11 andins

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 avatar Oct 24 '21 15:10 urig

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)

urig avatar Oct 25 '21 08:10 urig

@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.

alexcjohnson avatar Oct 25 '21 14:10 alexcjohnson

@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. 🙏🏻

urig avatar Oct 25 '21 15:10 urig

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.

nicolaskruchten avatar Apr 30 '22 00:04 nicolaskruchten