-
Notifications
You must be signed in to change notification settings - Fork 92
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
hvplots only work when executed line by line #5991
Comments
Due to #5991 we need to skip this test for now. <!-- Thank you for submitting a pull request. If this is your first pull request you can find information about contributing here: * https://github.com/posit-dev/positron/blob/main/CONTRIBUTING.md We recommend synchronizing your branch with the latest changes in the main branch by either pulling or rebasing. --> <!-- Describe briefly what problem this pull request resolves, or what new feature it introduces. Include screenshots of any new or altered UI. Link to any GitHub issues but avoid "magic" keywords that will automatically close the issue. If there are any details about your approach that are unintuitive or you want to draw attention to, please describe them here. --> ### Release Notes <!-- Optionally, replace `N/A` with text to be included in the next release notes. The `N/A` bullets are ignored. If you refer to one or more Positron issues, these issues are used to collect information about the feature or bugfix, such as the relevant language pack as determined by Github labels of type `lang: `. The note will automatically be tagged with the language. These notes are typically filled by the Positron team. If you are an external contributor, you may ignore this section. --> #### New Features - N/A #### Bug Fixes - N/A ### QA Notes @:plots <!-- Add additional information for QA on how to validate the change, paying special attention to the level of risk, adjacent areas that could be affected by the change, and any important contextual information not present in the linked issues. -->
I just updated hvplot to see if it would do the same thing. It seems to only fail when using Run Python File in Console. It was the same failure as before updating hvplot. Although, I added a line of code and couldn't get the execute selection to show the plot: import hvplot.pandas
import pandas as pd
hvplot.extension('plotly')
pd.DataFrame(dict(x=[1,2,3], y=[4,5,6])).hvplot.scatter(x="x", y="y")
x=25 I used Ctrl+Enter to run the selection and sourcing the file. Only running line-by-line works. It does appear to execute the entire block since |
positron/src/vs/workbench/contrib/positronWebviewPreloads/browser/utils.ts Lines 33 to 38 in 271dbb5
It seems to be something with checking the mime types. We get the holoviews mime type but the check requires more than that to trigger displaying the plot. These are the mime types when executing the file:
There's also a second message that comes in with these mime types:
So the file execution doesn't have the right mime types to display the plot and the message from the backend is effectively dropped. |
This is the only place that includes the holoviews exec mime type but it doesn't seem to add in @nstrayer I'm not really sure the reason we only render when receiving all three mime types but that only happens when running the code line-by-line. |
System details:
Positron and OS details:
Positron Version: 2025.02.0 (system setup) build 39
Code - OSS Version: 1.95.0
Commit: 968a8ac
Date: 2025-01-13T02:52:35.414Z
Electron: 32.2.1
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100
Interpreter details:
Python 3.10.10
Describe the issue:
This just started occurring on 1/14/2025. There seems to be some package dependency that updated, but we can't figure out which. It is similar to #4891
A simple python script to generate a plot using hvplot will only show if the script is executed line by line. It will not show if the entire file is sent to the console via the "run" button nor if you copy the entire block and past it in into the console.
Steps to reproduce the issue:
enter
to execute entire blockOnly by executing line by line (using
ctrl+enter
) will get the plot to showExpected or desired behavior:
Plot to show when executing entire file.
Were there any error messages in the UI, Output panel, or Developer Tools console?
vscode-app-1736882274763.log
QA Notes
See #5993 for disabled tests. Re-enable when this is resolved
The text was updated successfully, but these errors were encountered: