Skip to content

jupyter-gmaps loaded but cannot be instantiated  #359

@ylnhari

Description

@ylnhari

Issue:

I was able to successfully create gmaps figure object but when tried to display the map in a jupyter cell, receiving the following error ->

[Open Browser Console for more detailed log - Double click to close this message]
Model class 'FigureModel' from module 'jupyter-gmaps' is loaded but can not be instantiated
TypeError: Class constructor L cannot be invoked without 'new'
at new t (http://localhost:8888/nbextensions/jupyter-gmaps/index.js?v=20220906161950:39:179771)
at u._make_model (http://localhost:8888/nbextensions/jupyter-js-widgets/extension.js?v=20220906161950:2:747368)

It was working fine until few weeks ago. I tried re-installing jupyter-gmaps and enabling the gmaps jupyter extension, created fresh virtual environment, tried reinstalling node.js, reinstalling jupyter etc. but got no luck. I suspect some package version issues could be a reason for this as this setup is working fine until few weeks ago please help.

Note:- also ipywidgets should not be the issue because i was able to create widgets using it and they are working fine in the same jupyter notebook.

Input code used to generate a figure :

import gmaps
gmaps.configure(api_key=google_maps_key)
fig = gmaps.figure()
markers = gmaps.marker_layer(marker_locations) # marker_locations = [(latitude1, longitude1), (latitude2, longitude2),......,]
fig.add_layer(markers)

Requirements file:

python=3.7.0
tqdm
pandas
openpyxl
xlrd
requests
ortools
jupyter
gmaps

Screen shot of the error:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions