Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#8 Parsing bifdiag object in ipython results in error


My .auto file generates a branch of solutions for a PDE (similar to the bru demo) problem. I then load it with a python script (bd = auto.loadbd('branch1')), and for each label extract the corresponding solution, which is used to calculate the eigenvalues of the system (stability detection does not work for pdes).

The following code throws an AssertionError exception (Coordinate names must be unique):
bd = auto.loadbd('branch1')
labels = bd.getLabels()
for label in labels:
a = bd(label)['PAR(1)']

One of the weird things is that if I run the commands from ipython, the first time I try I get the same error. Subsequent calls work fine. After trying to find the source of the error I tried to be sneaky and tried to catch the error, figuring that after the first call the code would run. It did work when loading only parameters, but if I try to load a list, say bd[0]['PERIOD'], I get a RuntimeError about max recursion depth having been reached.

Any ideas or help would be greatly appreciated.


  • Ignacio

    parseB.py seems to be involved in both errors. Here's the first error message:

    File "bruss_2system_eigs.auto", line 139, in <module>
    a = bd(label)['PAR(1)']
    File "/home/irozada/Downloads/auto/07p/python/parseS.py", line 774, in __getitem__
    if isinstance(key,str) and hasattr(self,"b") and key in self.b:
    File "/home/irozada/Downloads/auto/07p/python/parseB.py", line 198, in __contains__
    for k,v in self.labels.items():
    File "/home/irozada/Downloads/auto/07p/python/parseB.py", line 190, in __getattr__
    Points.Point.__init__(self, p)
    File "/home/irozada/Downloads/auto/07p/python/Points.py", line 516, in __init__
    assert isUniqueSeq(self.coordnames), 'Coordinate names must be unique'
    AssertionError: Coordinate names must be unique

    Here's the second one:

    File "/home/irozada/Downloads/auto/07p/python/parseB.py", line 187, in __getattr__
    p = self.p
    RuntimeError: maximum recursion depth exceeded