Replies: 1 comment 4 replies
|
Thank you for the post. It could be a bug, but when I tested below in MxConsole, I didn't get an error. Am I missing something? >>> import modelx as mx
>>> m1 = mx.new_model() # Current Model set to Model1
>>> m1.close() # Current Model set to None |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Before PR, I would like to ask if it is intended code.
mx_get_modellist(kernel) makes list [current model(or None), model1, model2, ...]
and docstring said
"""Returns a list of model info.
Returns a list of dicts of basic model attributes.
The first element of the list is the current model info.
None if not current model is set.
"""
In is_modellist_updated, when comparing the old list and the new one, the None case is handled for old element (cur) but for the new element (oth) is not handled
so when the current model transitions from set -> None (old element is a dict and new element is None),
it evaluates oth["name"] as None["name"] and raises error. Since both lists come from the same mx_get_modellist,
my understanding is that if cur can be None, then oth can equally be None.
the following code supports your intend? ( I am afraid of misreading the intend)
All reactions