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

json problem in api.py #205

Open
matthewboman opened this issue May 30, 2016 · 1 comment
Open

json problem in api.py #205

matthewboman opened this issue May 30, 2016 · 1 comment

Comments

@matthewboman
Copy link

When I try to run the program, I get this error:

RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
Traceback (most recent call last):
  File "api.py", line 33, in <module>
    import matplotlib.pyplot as plt
  File "/home/crash/TestEnv/venv/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 27, in <module>
    import matplotlib.colorbar
  File "/home/crash/TestEnv/venv/local/lib/python2.7/site-packages/matplotlib/colorbar.py", line 32, in <module>
    import matplotlib.artist as martist
  File "/home/crash/TestEnv/venv/local/lib/python2.7/site-packages/matplotlib/artist.py", line 12, in <module>
    from .transforms import Bbox, IdentityTransform, TransformedBbox, \
  File "/home/crash/TestEnv/venv/local/lib/python2.7/site-packages/matplotlib/transforms.py", line 39, in <module>
    from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,
ImportError: numpy.core.multiarray failed to import

I then tried to update numpy to the most recent version, which leads to this error:

    Traceback (most recent call last):
  File "api.py", line 340, in <module>
    if __name__ == '__main__': main()
  File "api.py", line 286, in main
    opts = parse_args()
  File "api.py", line 274, in parse_args
    help='Path to the PNG file which should contain the data output')
  File "/usr/lib/python2.7/argparse.py", line 1297, in add_argument
    return self._add_action(action)
  File "/usr/lib/python2.7/argparse.py", line 1671, in _add_action
    self._optionals._add_action(action)
  File "/usr/lib/python2.7/argparse.py", line 1498, in _add_action
    action = super(_ArgumentGroup, self)._add_action(action)
  File "/usr/lib/python2.7/argparse.py", line 1311, in _add_action
    self._check_conflict(action)
  File "/usr/lib/python2.7/argparse.py", line 1449, in _check_conflict
    conflict_handler(action, confl_optionals)
  File "/usr/lib/python2.7/argparse.py", line 1456, in _handle_conflict_error
    raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --plot-file: conflicting option string(s): --plot-file

I tried it using my code, and then I tried it using the code on here, but either way I get the same issue.

@joshuamsmith
Copy link

Looks like you might have added the "--plot-file" option twice via add_argument method.
See the same error explained here: https://docs.python.org/2/library/argparse.html#conflict-handler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants