question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bokeh GMapOptions error

See original GitHub issue

Bokeh version - 0.12.16 Python - 3.5 OS - Windows 10 Browser - IE, Chrome, Firefox Other relevant packages - GMapOptions, gmap

I’m fairly new to Bokeh so please excuse me for my lack of knowledge/experience with bokeh. I am trying to create a geographic visualization using bokeh and then integrate my bokeh server app into flask to deploy it on a VPS. When run independently my code produces the necessary visualization but, gives an error in the command line. The error is occuring at the gmap call. I tried looking this error up and found a few relevant results all of which pointed to bugs in the Bokeh library. Where I am really getting stuck is, at the point of deployment of this visualization either independently as a bokeh server app or by integrating it with Flask because of this error. Any help on this is greatly appreciated. Thanks!

from bokeh.io import curdoc
from bokeh.models import GMapOptions
from bokeh.plotting import gmap
map_options = GMapOptions(lat=37.686293, lng=-97.3614409, map_type="roadmap", zoom=13)
p = gmap(google_api_key="My Google Maps API Key", map_options=map_options, title="Resolutions Clients", plot_width=1000, plot_height=600)
curdoc().add_root(p)

C:\Users\Administrator\PycharmProjects\FlaskApp>bokeh serve --show test.py 2018-06-11 14:20:52,449 Starting Bokeh server version 0.12.16 (running on Tornad o 5.0.2) 2018-06-11 14:20:52,463 Bokeh app running at: http://localhost:5006/test 2018-06-11 14:20:52,464 Starting Bokeh server with process id: 9972 2018-06-11 14:20:52,816 200 GET /test (::1) 161.02ms 2018-06-11 14:20:53,072 101 GET /test/ws?bokeh-protocol-version=1.0&bokeh-sessio n-id=YwriVJupgcBKp7IEeFdj5R95PJG2lxe6g82SFqbObcDA (::1) 1.00ms 2018-06-11 14:20:53,072 WebSocket connection opened 2018-06-11 14:20:53,072 ServerConnection created 2018-06-11 14:20:53,120 error handling message Message ‘PATCH-DOC’ (revision 1): TypeError(“init() missing 2 required positional arguments: ‘google_api_key’ and ‘map_options’”,)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
anujnimkarcommented, Jun 15, 2018

Hey @bryevdv , thanks for narrowing the issue down to the bokeh server code. I initially thought that since, the code was running independently on bokeh server (although displaying the PATCH-DOC error), I was missing out something on the Flask side, also thanks for pointing out the autoload_static in Flask code, I’m using server_session, now.

0reactions
bryevdvcommented, Jun 18, 2018

Hopefully this week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python, Bokeh, "oops! something went wrong" when mapping
This is almost definitively an issue with gmaps' API key. It would be useful to follow the error message's advice and check the...
Read more >
gmap — Bokeh 2.4.1 Documentation
map_options – ( GMapOptions ) Configuration specific to a Google Map ... This setting may be useful if pixel rounding errors are causing...
Read more >
Bokeh: Interactive visualizations for web pages - John T. Foster
GMapOptions class to set map options as well as bokeh.plotting.gmap for creating the figure. After figure creation, setting a data source and adding...
Read more >
Python Bokeh – Plot for all Types of Google Maps ( roadmap ...
In order to use these maps we have to : Import the required libraries and modules : gmap from bokeh.plotting; GMapOptions from bokeh.models ......
Read more >
bokeh Changelog - pyup.io
9744 [component: bokehjs] [BUG] bokeh server layout overlap on toggle visibility ... 7985 [API: plotting] Bokeh gmapoptions error
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found