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

Fix ipywidget Output widget bug #487

Merged
merged 1 commit into from
Jul 2, 2023
Merged

Fix ipywidget Output widget bug #487

merged 1 commit into from
Jul 2, 2023

Conversation

giswqs
Copy link
Member

@giswqs giswqs commented Jul 2, 2023

Leafmap uses ipywidget's Output widget heavily to display text and plots. It appears that Output widget behaves different in different environments, causing issues such as disappearing maps in ArcGIS Pro.

The problematic way:

import ipywidgets as widgets
output = widgets.Output()
with output:
    print('Hello World')
output
output.clear_output()

The recommended way:

import ipywidgets as widgets
output = widgets.Output()
output.append_stdout('Hello World')
# output.append_display_data(data)
output
output.outputs = ()

Relevant issues:

@github-actions
Copy link

github-actions bot commented Jul 2, 2023

@github-actions github-actions bot temporarily deployed to pull request July 2, 2023 05:39 Inactive
@giswqs giswqs merged commit 1eeeddf into master Jul 2, 2023
12 checks passed
@giswqs giswqs deleted the output branch July 2, 2023 11:53
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

Successfully merging this pull request may close these issues.

None yet

1 participant