Skip to content

Sporadic graph reference error when importing plotly #611

Closed
@bnaul

Description

@bnaul
➜  ~ python -c 'import plotly; print("OK!")'
OK!
➜  ~ python -c 'import plotly; print("OK!")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/plotly/__init__.py", line 31, in <module>
    from plotly import (plotly, graph_objs, grid_objs, tools, utils, session,
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/plotly/plotly/__init__.py", line 10, in <module>
    from . plotly import (
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/plotly/plotly/plotly.py", line 31, in <module>
    from plotly import exceptions, tools, utils, version, files
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/plotly/tools.py", line 21, in <module>
    from plotly import graph_reference
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/plotly/graph_reference.py", line 523, in <module>
    OBJECTS = _get_objects()
  File "/Users/brettnaul/miniconda3/envs/cesium/lib/python3.5/site-packages/plotly/graph_reference.py", line 406, in _get_objects
    if any([key in path for key in GRAPH_REFERENCE['defs']['metaKeys']]):
KeyError: 'metaKeys'

Going offline prevents this error, so I expect it's related to a hosting issue (my colleague is experiencing the same error from a different location, so I doubt it's my internet). Might be irrelevant once wherever this download is being served from stops acting up, but regardless this seems like very undesirable behavior. In particular, any kind of production service that imports plotly will be broken until this is resolved.

EDIT: this is with plotly==1.12.9 or with the latest master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions