Skip to content

Commit

Permalink
fix install on start_instance
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirroni committed Oct 5, 2024
1 parent 6ab110a commit 42db5db
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions matpowerpip/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import re
import warnings


class Matpower:
Expand Down Expand Up @@ -55,11 +54,9 @@ def start_instance(
path_matpower = PATH_MATPOWER

m.addpath(path_matpower)
try:
m.install_matpower(1, 0, 0) # TODO: explain what is (1, 0, 0)
except Exception as e:
# Oct2PyError
warnings.warn(e, stacklevel=2)

# modify my path, save, silently, remove existing path if exist before install
m.install_matpower(1, 1, 0, 1)

m.rmpath(path_matpower)

Expand Down Expand Up @@ -201,7 +198,7 @@ def purge_matpower(path_matpower=None, session=None, engine="octave"):
return m


__MATPOWERPIP_VERSION__ = "2.2.0"
__MATPOWERPIP_VERSION__ = "2.2.1"

try:
current_path = os.path.abspath(os.path.dirname(__file__))
Expand Down

0 comments on commit 42db5db

Please sign in to comment.