Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Tornado not starting on Windows 10 / Python 3.8 breaks display() #38

Closed
eamoore opened this issue Apr 30, 2020 · 1 comment
Closed

Tornado not starting on Windows 10 / Python 3.8 breaks display() #38

eamoore opened this issue Apr 30, 2020 · 1 comment

Comments

@eamoore
Copy link

eamoore commented Apr 30, 2020

Charts are served to the Viewer via a background service implemented on Tornado.

On Windows 10, Python 3.8, Tornado won't start. This may apply to more Altair renderers than 'altair_viewer' and 'mimetype'. I am working outside a notebook environment (Jupyter, Collab, etc). Without Tornado, display() and show() don't work. Practically speaking, it looks like the best work around for a non notebook IDE or user around is to render charts to html (Chart.save()).

The stack trace points to asyncio,
asyncio\events.py", line 501, in add_reader raise NotImplementedError

This stackoverflow thread points a platform constraint:
https://stackoverflow.com/questions/54608421/how-to-fix-notimplementederror-when-trying-to-run-hydrogen-in-atom

If I am understanding the issue and workaround correctly, it might be worth mentioning in the doc, at https://altair-viz.github.io/user_guide/display_frontends.html#altair-viewer

@eamoore
Copy link
Author

eamoore commented Apr 30, 2020

Following up, I implemented a recommended workaround (edit Lib/asyncio/init.py) and that solved the issue.

see https://stackoverflow.com/questions/58422817/jupyter-notebook-with-python-3-8-notimplementederror/58430041#58430041

I still think a heads up for Windows users would be good.

@eamoore eamoore closed this as completed Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant