You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading in 2 components in the same python instance, the second one is incomplete:
In [1]: f1 = open('file1.xml', 'r')
In [2]: f2 = open('file2.xml', 'r')
In [3]: from ipyxact.ipyxact import Component
In [4]: c1 = Component()
In [5]: c2 = Component()
In [6]: c1.load(f1)
In [7]: c2.load(f2)
In [8]: c1.memoryMaps
Out[8]: <ipyxact.ipyxact.MemoryMaps at 0x2ffa290>
In [9]: c1.memoryMaps.memoryMap
Out[9]:
[<ipyxact.ipyxact.MemoryMap at 0x3085dd0>,
<ipyxact.ipyxact.MemoryMap at 0x30870d0>]
In [10]: c2.memoryMaps
In [11]: c2.memoryMaps.memoryMap
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-11-4b0e797fcc70> in <module>()
----> 1 c2.memoryMaps.memoryMap
AttributeError: 'NoneType' object has no attribute 'memoryMap'
I need to start a new python interpreter and load everything again to be able to read the second file correctly.
I tried by deleting the references to c1 and by unloading/reloading the module but only a fresh python interpreter will make it work again.
Changing the order of the opening, instance creation or loading does not make a difference.
The text was updated successfully, but these errors were encountered:
Ouch. That doesn't sound nice. I'm probably doing some questionable things here. Don't have a good idea for now, but the long-term solution will be to move to another API that is created by generateDS. There's some preliminary work here
From version 0.3.0 and onwards, a new API will be used which hopefully doesn't have this problem. You can find the new API here and I will push some example code later on
When reading in 2 components in the same python instance, the second one is incomplete:
I need to start a new python interpreter and load everything again to be able to read the second file correctly.
I tried by deleting the references to
c1
and by unloading/reloading the module but only a fresh python interpreter will make it work again.Changing the order of the opening, instance creation or loading does not make a difference.
The text was updated successfully, but these errors were encountered: