-
Notifications
You must be signed in to change notification settings - Fork 150
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
"IOError: stream is closed or unusable" when using parse_file() in Pluto.jl #830
Comments
@samtalki, thanks for reporting this issue. Given that If you can build a MWE that produces this error without using Pluto, then please post that here and I can explore how to fix it. |
I am going to close this as it is not reproducible in this repo. |
hi, sorry for commenting on this very old issue, hope you don't mind. |
Thanks @MartaVanin. Can you document a MWE so that this issue can be reproduced? |
yes, using Julia 1.8, if I run the following in a Pluto 0.18.0 notebook it works, while it fails on the latest Pluto (v0.19.24) begin
using PowerModels # automatically install latest, see https://github.com/fonsp/Pluto.jl/wiki/%F0%9F%8E%81-Package-management
test_file = joinpath(dirname(dirname(pathof(PowerModels))), "test/data/matpower/case5.m")
f = parse_matpower(test_file)
end I can open an issue on Pluto and @ you there if you like |
Report from @ChrisRackauckas on how to reproduce, import PowerModels
file_name = "../../benchmarks/OptimizationFrameworks/opf_data/pglib_opf_case5_pjm.m"
data = PowerModels.parse_file(file_name) works, but import PowerModels file_name = "../../benchmarks/OptimizationFrameworks/opf_data/pglib_opf_case5_pjm.m"
data = PowerModels.parse_file(file_name) fails The issue is related to Memento's stream being closed prematurely. |
Related issue, JunoLab/Weave.jl#442 #886 does not appear to fix the issue. |
It doesn't seem to make a difference, other than fixes lanl-ansi#830
Hello all,
I have encountered a new bug on my machine over the past few months when attempting to use
parse_file()
within a Pluto.jl notebook.. This is one of those tricky issues where it's not clear which package is causing the bug, so I apologize in advance for the confusion. I looked into the source of both packages to try to seek out the root cause, but unfortunately I couldn't figure it out on my own. Please let me know if you agree that I should also open an issue with Pluto.Info on my machine:
Step 1: setup environment to reproduce:
For convenience, you could skip this step and clone my repository I made to demonstrate this issue (available here).
Alternatively, make a fresh Julia environment >=1.7 and load your favorite test case into the root directory. Run these commands in the REPL:
Step 2: run
parse_file()
in a Pluto.jl notebookWithin the Pluto landing page, create a new notebook. Drop your
case14.m
or other file into the same directory as the notebook and then run the following commands within the notebook to reproduce the error.You should receive the following error:
The text was updated successfully, but these errors were encountered: