-
Notifications
You must be signed in to change notification settings - Fork 74
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
bokeh plot library doesn't work on positron in windows #4397
Comments
<!-- 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. --> addresses #4397 osx wants the url for this file to be in `file://....` format where windows just wants `c://...`, so making a small check to account for that! ### QA Notes <!-- 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. --> ```python from bokeh.plotting import figure, show p = figure(title="Simple line example", x_axis_label='x', y_axis_label='y') p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], legend_label="Temp.", line_width=2) show(p) ``` should run without error
I just checked in 2024.08.0-83 and it's still failing. Note, it works on a dev build (hence why I approved the PR), but not this release build. It still has issues writing to that file location. |
@isabelizimm I think we need to consider that this logic is returning False on Windows (perhaps under certain circumstances), leading bokeh to not use a temp file and falling back to the default location of the parent directory of the python process, which is not actually writable to Positron's ipykernel process: https://github.com/bokeh/bokeh/blob/branch-3.6/src/bokeh/io/util.py#L123 |
Ah, that is probably the root of the problem; bokeh is using
So that always returns True (you can see the file in the |
re: #4397 patches bokeh to not allow writing files to positron extension A few other stragglers-- the [Python nightly tests are failing for bokeh stuff](https://github.com/posit-dev/positron/actions/workflows/positron-python-nightly.yml), likely due to the fact `bokeh` is not being installed. AND I am turning the Windows tests back on, they seem to be running on my machine but if there is other context I'm missing happy to rework tests in a different way!
Verified FixedPositron Version(s) : 2024.09.0-8 Test scenario(s)bokeh plots now work as expected Link(s) to TestRail test cases run or created: |
System details:
Positron and OS details:
Latest daily 2024.08.0-31
Windows 11
Interpreter details:
Python 3.12.2
Describe the issue:
bokeh
library works in a python shell outside of Positron, but does not work inside positron using either a file or directly in the console. Looks to be missed in #4118Steps to reproduce the issue:
Execute sample:
Results in error output (this one is from a notebook)
Expected or desired behavior:
Plot to show
Were there any error messages in the UI, Output panel, or Developer Tools console?
The text was updated successfully, but these errors were encountered: