Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook Crashes When running some cells #260

Closed
mitirmizi opened this issue Oct 13, 2022 · 4 comments
Closed

Notebook Crashes When running some cells #260

mitirmizi opened this issue Oct 13, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@mitirmizi
Copy link

mitirmizi commented Oct 13, 2022

I was following the "Getting Started" page on traffic documentation website. I downloaded the quickstart.ipynb to experiment with the library as well. When I get to the cell with the code:

from cartes.crs import Lambert93
from traffic.data import airports

with plt.style.context("traffic"):

    fig, ax = plt.subplots(subplot_kw=dict(projection=Lambert93()))

    airports["LFPO"].plot(ax, footprint=False, runways=dict(linewidth=1))
    for flight in subset:
        flight.plot(ax, linewidth=2)

    ax.set_title("Landing trajectories at Paris–Orly airport")

The notebook crashes. Also the visualization on the Getting started page: https://traffic-viz.github.io/quickstart.html#declarative-trajectory-processing is missing well.


To reproduce the issue

Follow the quickstart.ipynb which can be downloaded from Getting Started page.

Versions I'm using

Python==3.10.6
traffic==2.8.0

@mitirmizi mitirmizi added the bug Something isn't working label Oct 13, 2022
@xoolive
Copy link
Owner

xoolive commented Oct 15, 2022

Thank you for the report,

Would you mind trying what's here:
https://traffic-viz.github.io/troubleshooting/installation.html

Section “Python crashes when I try to reproduce plots in the documentation”

Please report here whether it solves your issue.

@xoolive
Copy link
Owner

xoolive commented Oct 17, 2022

Little addition wrt to the documentation, it seems that, for maps only, I need to explicitly ask for the fig now, as follows:

from cartes.crs import Lambert93
from traffic.data import airports

with plt.style.context("traffic"):

    fig, ax = plt.subplots(subplot_kw=dict(projection=Lambert93()))

    airports["LFPO"].plot(ax, footprint=False, runways=dict(linewidth=1))
    for flight in subset:
        flight.plot(ax, linewidth=2)

    ax.set_title("Landing trajectories at Paris–Orly airport")

fig

I will edit the documentation accordingly

@mitirmizi
Copy link
Author

mitirmizi commented Oct 17, 2022

Thank you for the help.
For future visitors:
The section: "Python crashes when I try to reproduce plots in the documentation" on the page
https://traffic-viz.github.io/troubleshooting/installation.html
helped solve the problem.

Furthermore, adding the fig prints the plot. So yes if you can add that in the documentation, that would be great !

@xoolive
Copy link
Owner

xoolive commented Oct 17, 2022

@herozero777 About item 2, I opened an issue: ipython/matplotlib-inline#22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants