lifelib icon indicating copy to clipboard operation
lifelib copied to clipboard

Simplelife.build() error with latest Modelx version

Open DemosthenisD opened this issue 5 years ago • 1 comments

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'

DemosthenisD avatar Aug 19 '20 14:08 DemosthenisD

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.

fumitoh avatar Aug 19 '20 15:08 fumitoh