vitchyr / viskit

rllab's viskit with some added features
73 stars 35 forks source link

plotly.exceptions.PlotlyDictValueError: 'title' has invalid value inside 'layout' #1

Closed vitchyr closed 5 years ago

vitchyr commented 5 years ago

Repeat https://github.com/vitchyr/rlkit/issues/18 for completeness

When trying to plot the results with viskit, the follow error occurs.

...
  File "/home/vitchyr/git/viskit/viskit/frontend.py", line 762, in index
    plot_div = get_plot_instruction(plot_keys=plot_keys)
  File "/home/vitchyr/git/viskit/viskit/frontend.py", line 502, in get_plot_instruction
    plot_width=plot_width, plot_height=plot_height
  File "/home/vitchyr/git/viskit/viskit/frontend.py", line 79, in make_plot
    title=title,
  File "/home/vitchyr/anaconda2/envs/railrl-env-4/lib/python3.5/site-packages/plotly/graph_objs/graph_objs.py", line 613, in update
    self[key] = val
  File "/home/vitchyr/anaconda2/envs/railrl-env-4/lib/python3.5/site-packages/plotly/graph_objs/graph_objs.py", line 430, in __setitem__
    value = self._value_to_graph_object(key, value, _raise=_raise)
  File "/home/vitchyr/anaconda2/envs/railrl-env-4/lib/python3.5/site-packages/plotly/graph_objs/graph_objs.py", line 535, in _value_to_graph_object
    raise exceptions.PlotlyDictValueError(self, path)
plotly.exceptions.PlotlyDictValueError: 'title' has invalid value inside 'layout'

Path To Error: ['layout']['title']

Current path: ['layout']
Current parent object_names: ['figure']

With the current parents, 'title' can be used as follows:

Under ('figure', 'layout'):

    editType: layoutstyle
    role: object

127.0.0.1 - - [29/Dec/2018 15:56:30] "GET / HTTP/1.1" 500 -
vitchyr commented 5 years ago

You can fix this by updating plotly to version 3.4.2 and using the latest version of viskit (see vitchyr/viskit@b07f9b5)