Error in ff.Create_hexbin_mapbox

Getting the following error while creating Hexbins in Mapbox using Plotly figure factory.

ValueError                                
Traceback (most recent call last)
<ipython-input-8-a36bc32c0a84> in <module>
      5 #df = hab[hab['STATE_ID'] ==2].dropna()
      6 
----> 7 fig = ff.create_hexbin_mapbox(
      8     data_frame=df, lat=df["longitude"].astype("double"), lon=df["latitude"].astype("double"), color=df['TOT_POPULA'].astype("double"),agg_func=np.sum,nx_hexagon=10,
      9     opacity=0.7, labels={"color": "Population"},

c:\ProgramData\Anaconda3\lib\site-packages\plotly\figure_factory\_hexbin_mapbox.py in create_hexbin_mapbox(data_frame, lat, lon, color, nx_hexagon, agg_func, animation_frame, color_discrete_sequence, color_discrete_map, labels, color_continuous_scale, range_color, color_continuous_midpoint, opacity, zoom, center, mapbox_style, title, template, width, height, min_count, show_original_data, original_data_marker)
    352     lon_range = args["data_frame"][args["lon"]].agg(["min", "max"]).values
    353 
--> 354     hexagons_lats, hexagons_lons, hexagons_ids, count = _compute_wgs84_hexbin(
    355         lat=args["data_frame"][args["lat"]].values,
    356         lon=args["data_frame"][args["lon"]].values,
c:\ProgramData\Anaconda3\lib\site-packages\plotly\figure_factory\_hexbin_mapbox.py in _compute_wgs84_hexbin(lat, lon, lat_range, lon_range, color, nx, agg_func, min_count)
    280     x_range, y_range = _project_latlon_to_wgs84(lat_range, lon_range)
    281 
--> 282     hxs, hys, centers, agreggated_value = _compute_hexbin(
    283         x, y, x_range, y_range, color, nx, agg_func, min_count
    284     )

c:\ProgramData\Anaconda3\lib\site-packages\plotly\figure_factory\_hexbin_mapbox.py in _compute_hexbin(x, y, x_range, y_range, color, nx, agg_func, min_count)
    136 
...
--> 138         lattice1 = np.zeros((nx1, ny1))
    139         lattice2 = np.zeros((nx2, ny2))
    140         c1 = (0 <= ix1) & (ix1 < nx1) & (0 <= iy1) & (iy1 < ny1) & bdist

ValueError: negative dimensions are not allowed

Code:

df= pd.read_csv("data\India_hab_master.csv")

px.set_mapbox_access_token(open("mapbox_token").read())
        
fig = ff.create_hexbin_mapbox(
    data_frame=df, lat="latitude", lon="longitude", color='TOT_POPULA',
    agg_func=np.sum,  nx_hexagon=30,
    opacity=0.7, labels={"color": "Population"},
    show_original_data=False,
    original_data_marker=dict(size=1, opacity=0.6, color="deeppink"),
    min_count=1
)
fig.update_layout(margin=dict(b=0, t=0, l=0, r=0))
fig.show()