PowerModels.jl icon indicating copy to clipboard operation
PowerModels.jl copied to clipboard

"IOError: stream is closed or unusable" when using parse_file() in Pluto.jl

Open samtalki opened this issue 2 years ago • 7 comments

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:

  • Julia Version: 1.7.3 (2022-05-06) Fedora 36 Build
  • OS: Fedora 36
  • CPU: Ryzen 4750U

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:

pkg> generate PlutoPowerModelsTest
shell> cd PlutoPowerModelsTest
pkg> activate .
pkg> add Pluto
julia> import Pluto
julia> Pluto.run()

Step 2: run parse_file() in a Pluto.jl notebook

Within 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.

using PowerModels
case14 = parse_file("case14.m")

You should receive the following error: image

samtalki avatar Jul 04 '22 03:07 samtalki