Coder Social home page Coder Social logo

AIRAC RuntimeError about traffic HOT 6 CLOSED

xoolive avatar xoolive commented on July 30, 2024
AIRAC RuntimeError

from traffic.

Comments (6)

xoolive avatar xoolive commented on July 30, 2024

Hello,

I am sorry you encounter this issue. In theory, you should be able to download from OpenSky without AIRAC data. I will investigate when I am back, but before that could you help by (please) copy-pasting here the smallest piece of code that creates this error?

Thank you

from traffic.

babetoduarte avatar babetoduarte commented on July 30, 2024

Hello Xavier,

I get this error while trying to run the example that is shown in the project's Readme:

traffic opensky 2018-01-01T06:00 -s 2018-01-01T08:00 -b Andorra -o andorra.pkl

Here's the dump:

Traceback (most recent call last):
  File "/Users/jad/anaconda3/envs/python3/bin/traffic", line 11, in <module>
    sys.exit(main())
  File "/Users/jad/anaconda3/envs/python3/lib/python3.6/site-packages/traffic/console/__init__.py", line 62, in main
    return mod.main(args.args)
  File "/Users/jad/anaconda3/envs/python3/lib/python3.6/site-packages/traffic/console/opensky.py", line 76, in main
    opensky_data(**vars(args))
  File "/Users/jad/anaconda3/envs/python3/lib/python3.6/site-packages/traffic/console/opensky.py", line 15, in opensky_data
    kwargs["bounds"] = airac[bounds]
  File "/Users/jad/anaconda3/envs/python3/lib/python3.6/site-packages/traffic/data/airspaces/airac.py", line 301, in __getitem__
    return next(self.search(name, operator.eq), None)
  File "/Users/jad/anaconda3/envs/python3/lib/python3.6/site-packages/traffic/data/airspaces/airac.py", line 308, in search
    self.init_cache()
  File "/Users/jad/anaconda3/envs/python3/lib/python3.6/site-packages/traffic/data/airspaces/airac.py", line 79, in init_cache
    raise RuntimeError(msg)
RuntimeError: Edit file /Users/jad/Library/Application Support/traffic/traffic.conf with AIRAC directory

and here's what my traffic.conf file looks like:

[global]
 airac_path =
 opensky_username = MyOpenSkyUsername
 opensky_password = MyOpenSkyPassword
 [plugins]
 enabled_plugins = Bluesky, CesiumJS

Thank you very much for your help.

Happy Holidays!

from traffic.

xoolive avatar xoolive commented on July 30, 2024

I see! That’s my mistake but it should be very easy to fix... 👍
It’s not a problem in the library but in the script. I can probably push the fix in about 48h.

from traffic.

xoolive avatar xoolive commented on July 30, 2024

@babetoduarte you may try now (git pull then python setup.py install)

from traffic.

babetoduarte avatar babetoduarte commented on July 30, 2024

@xoolive thank you very much for the quick fix. I was able to run the example code correctly once I updated my local copy of traffic.

I have one last question, I am trying to obtain flight track data over the US, however I can't seem to figure out the proper bound name I must use in order to gather OpenSky data over this region. Is there any documentation on this? Can I provide coordinates for a bounding box instead of a name?

Thank you very much for your help.

Happy New Year!

from traffic.

xoolive avatar xoolive commented on July 30, 2024

@babetoduarte Yes you can try option -b " -127,24,-65,50" (order is west/south/east/north)

Note the classical bracket-space-hyphen trick if you want to pass a negative number that is not an argparse argument:

-b " -127,24,-65,50"
   ^^^

Also, I usually go to https://www.openstreetmap.org/, click "export" then get a way to get the coordinates of a bounding box (that's how I came with those numbers)

If it gets too complex with the command-line tool, it will probably be easier to use the library and look at the help of each function. (This specific function should be properly documented)

from traffic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.