BYU-PRISM / GEKKO

GEKKO Python for Machine Learning and Dynamic Optimization
https://machinelearning.byu.edu
Other
573 stars 102 forks source link

m.open_folder() on WSL #104

Closed jnhopark closed 5 months ago

jnhopark commented 3 years ago

I am running GEKKO in the WSL system, and getting this error when I run the m.open_folder().

Error: no "view" mailcap rules found for type "inode/directory"
Can't call method "get_value" on an undefined value at /usr/bin/mimeopen line 159.
dhill2522 commented 3 years ago

It looks like this is an issue with the Python script trying to open a Linux xdg-dialog even though it is on a Windows system. I would expect that there are a number of other people starting to run into this type of issue now that WSL is getting more popular.

Maybe something like this would work? https://github.com/cpbotha/xdg-open-wsl

dhill2522 commented 3 years ago

Something like this also looks quite promising. It looks like probably a good patch for the time being as well. https://github.com/4U6U57/wsl-open

@jnhopark You can just follow the standalone installation instructions at the bottom of the page and Gekko will probably work as is. No guarantees though.

APMonitor commented 5 months ago

This looks like an issue with WSL that should hopefully be fixed by the OS developments. I don't think we need to do anything from gekko development. Someone can always print(m._path) to find the temporary directory.