Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: render_html() got an unexpected keyword argument 'offline_mode' #61

Open
TianruiZhang opened this issue Dec 25, 2024 · 1 comment

Comments

@TianruiZhang
Copy link

Can somebody tell me why this happened?


TypeError Traceback (most recent call last)
Cell In[28], line 19
17 topics_dataframe = pd.DataFrame({"topics": topics_per_point})
18 reduced_embeddings = UMAP(n_neighbors=10, n_components=2, min_dist=0.0, metric='cosine').fit_transform(embeddings)
---> 19 plot = datamapplot.create_interactive_plot(
20 reduced_embeddings,
21 *label_layers,
22 hover_text=hover_text,
23 extra_point_data=topics_dataframe,
24 inline_data=True,
25 search_field="topics",
26 enable_search=True,
27 width=1024,
28 height=1024,
29 logo="https://assets.stickpng.com/thumbs/XXXXX.png",
30 logo_width=100,
31 min_fontsize=14,
32 max_fontsize=36,
33 text_collision_size_scale=5,
34 text_outline_width=8,
35 point_line_width=0,
36 initial_zoom_fraction=100,
37 # cmap=colorcet.cm.colorwheel,
38 cluster_boundary_polygons=True,
39 cluster_boundary_line_width=0,
40 polygon_alpha=1,
41 title='XXXXX',
42 darkmode=False,
43 offline_mode=True
44 )
45 plot.save('interactive_plot.html')

File /app/james/env/james/lib/python3.10/site-packages/datamapplot/create_plots.py:607, in create_interactive_plot(data_map_coords, hover_text, inline_data, noise_label, noise_color, color_label_text, label_wrap_width, label_color_map, width, height, darkmode, palette_hue_shift, palette_hue_radius_dependence, cmap, marker_size_array, marker_color_array, marker_alpha_array, use_medoids, cluster_boundary_polygons, color_cluster_boundaries, polygon_alpha, cvd_safer, jupyterhub_api_token, *label_layers, **render_html_kwds)
604 marker_alpha_array *= 255
605 point_dataframe["a"] = marker_alpha_array.astype(np.uint8)
--> 607 html_str = render_html(
608 point_dataframe,
609 label_dataframe,
610 inline_data=inline_data,
611 color_label_text=color_label_text,
612 darkmode=darkmode,
613 **render_html_kwds,
614 )
616 return InteractiveFigure(html_str, width=width, height=height, api_token=jupyterhub_api_token)

TypeError: render_html() got an unexpected keyword argument 'offline_mode'

@lmcinnes
Copy link
Contributor

Sorry, the current version on PyPI doesn't have this functionality yet -- you'll have to install from the github repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants