Unhelpful error when passing invalid argument to gridplot
See original GitHub issueI often find myself assembling a list of plots and then writing:
$ show(gridplot(plots, n_cols=4))
This will give the following error:
TypeError Traceback (most recent call last)
<ipython-input-25-656b46f60be9> in <module>()
----> 1 show(gridplot(plots, n_cols=4, toolbar_location=None))
~/Dev/bokeh/bokeh/bokeh/layouts.py in gridplot(*args, **kwargs)
320 row_tools = []
321 row_children = []
--> 322 for item in row:
323 if merge_tools:
324 if item is not None:
TypeError: 'Figure' object is not iterable
The problem is that I wrote n_cols
instead of ncols
. At this point I’ve done this dozens and dozens of times. Every time I come back to bokeh after a gap, this always trips me up and I forget the ncols/n_cols thing and think there’s some more fundamental mistake.
Can we validate the input to gridplot better?
One of my favorite features about bokeh is the helpful suggestions when you mess up a parameter. I know this is completely different, and nothing to do with the property machinery, but none-the-less a similar experience would be awesome.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Plotly error 'Invalid argument `figure.data` passed into Graph'
Since this graph is a cufflinks graph, the graph is displayed by setting it as fig as it is, rather than assigning it...
Read more >Error, (in plots/complexplot) invalid arguments - Maple Help
This error occurs when an argument of an incorrect type is passed to a command. The type of arguments accepted by Maple commands...
Read more >ArgumentOutOfRangeException Class (System)
An ArgumentOutOfRangeException exception is thrown when a method is invoked and at least one of the arguments passed to the method is not...
Read more >Invalid argument: status = %s - Teradata Tools and Utilities
TPT02202 Error : Invalid argument: status = %s Explanation: A TPT process, task, component or function encountered an unanticipated and ...
Read more >NOTE: Invalid argument to function INPUT - SAS Communities
Solved: I'm using an array to convert character variables to numeric. The code executes w/o errors or warnings, but the notes state "...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try this gridplot([p1,p2],[])
@02akshay You will have elaborate, without context it’s not obvious what point you are trying to make. Are you saying that snippet works? doesn’t work? does something unexpected?