Skip to content
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

Simplelife.build() error with latest Modelx version #8

Open
DemosthenisD opened this issue Aug 19, 2020 · 1 comment
Open

Simplelife.build() error with latest Modelx version #8

DemosthenisD opened this issue Aug 19, 2020 · 1 comment

Comments

@DemosthenisD
Copy link

DemosthenisD commented Aug 19, 2020

Hi,

I updated modelx to the latest version and tried to incorporate the new "new_excel_range" method and was getting errors. I resorted to rerunning the basic Simplelife project I had (which previously worked) that now gives an error
"File "C:\Demosthenis_PythonRelated_Anaconda\lib\site-packages\modelx\core\base.py", line 419, in new
raise ValueError("Invalid direct constructor call.")"
lifelib version = '0.0.14'
modelx version = '0.9.0'

Here are the order of the commands (with output):

import simplelife
model = simplelife.build()

Traceback (most recent call last):

  File "<ipython-input-102-f7600826e8fb>", line 1, in <module>
    model = simplelife.build()

  File "C:\Demosthenis\_PythonRelated\ModelX\LifeLib\mylife\simplelife.py", line 37, in build
    model = mx.new_model(name='simplelife')

  File "C:\Demosthenis\_PythonRelated\_Anaconda\lib\site-packages\modelx\core\api.py", line 101, in new_model
    """

  File "C:\Demosthenis\_PythonRelated\_Anaconda\lib\site-packages\modelx\core\system.py", line 489, in new_model
    self.currentmodel = ModelImpl(system=self, name=name)

  File "C:\Demosthenis\_PythonRelated\_Anaconda\lib\site-packages\modelx\core\model.py", line 362, in __init__
    Impl.__init__(self, system=system, parent=None, name=name)

  File "C:\Demosthenis\_PythonRelated\_Anaconda\lib\site-packages\modelx\core\base.py", line 202, in __init__
    self.interface = self.interface_cls(self)

  File "C:\Demosthenis\_PythonRelated\_Anaconda\lib\site-packages\modelx\core\base.py", line 419, in __new__
    raise ValueError("Invalid direct constructor call.")

ValueError: Invalid direct constructor call.


import lifelib

lifelib.__version__
Out[104]: '0.0.14'

mx.__version__
Out[105]: '0.9.0'
@fumitoh
Copy link
Member

fumitoh commented Aug 19, 2020

I couldn't reproduce the error. Can you zip C:\Demosthenis\_PythonRelated\ModelX\LifeLib\mylife and attach it if no private information is held in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants