IndexError: string index out of range

126 views
Skip to first unread message

Sarah El kadry

unread,
Mar 9, 2022, 11:32:58 AM3/9/22
to OpenQuake Users
Hello,
I am using pyhton 3.9 and since I installed the new version of openquake (OQ 3.13) , I started to encounter a new problem that did not exist in the previous versions. So in fact in my source logic tree I have a lot of branches (96 branches) and every time I try to run the calculation, openquake can't read the source files and the following error message appears:
"IndexError: string index out of range"

So I tried to reduce the number of branches to 64, then I ran the calculation and it worked.

Any idea on what should I do to include as many branches in the source model logic tree as I need?

Attached herewith is the full error message I get

Looking forward to hearing from you.
Thank you,



Oqerror.txt

Michele Simionato

unread,
Mar 10, 2022, 12:39:42 AM3/10/22
to OpenQuake Users
There is a limit on 94 branches introduced in engine 3.13 for technical reasons. Can you reduce the number of branches in some way?
Perhaps there is better way to model your uncertainties.

 Michele

Sarah El kadry

unread,
Mar 10, 2022, 7:48:01 AM3/10/22
to OpenQuake Users
Is it 94 branches for the source model only or for the combination source model + GMM ?

This is bad news for us; because of our research environment, we often need many more branches to quantify uncertainties.

Thank you for your response,

Michele Simionato

unread,
Mar 11, 2022, 2:40:38 AM3/11/22
to OpenQuake Users
Maybe I am wrong, but it seems to me that you are confusing number of branches with number of realizations.
The limit is on 94 branches per branchset but there is no limit on the number of realizations. Even the limit on 94 branches
could be raised a bit (to 188 branches to branchset) but I am reluctant to do so, because needing so many branches is (often) an
indication that the user is doing something wrong. Could you explain exactly what are you trying to do?

       Michele

ilini...@gmail.com

unread,
Mar 11, 2022, 11:31:06 AM3/11/22
to OpenQuake Users
Dear Michele,

Apparently from 64 branches on there is an error message?

 We build source model logic trees with only 1 branching level (1 branchset). We create all the alternative models (combinations of alternative decisions or parameters in the different steps necessary to build the source model), estimate the weights, and then build the source model logic tree input file. This gives us complete freedom. We have never used uncertaintyType attributes, which would restrict us on which uncertainties to consider and how to consider them.

Imposing a limit on the total number of branches within a branching level is therefore a problem. For now we can handle it by performing different runs, then gather results and re-process them, but it is a pity.

 Thanks a lot for your help. Best wishes,

Céline

 

Michele Simionato

unread,
Mar 14, 2022, 4:37:55 AM3/14/22
to OpenQuake Users
On Friday, March 11, 2022 at 5:31:06 PM UTC+1 ilini...@gmail.com wrote:

 We build source model logic trees with only 1 branching level (1 branchset). We create all the alternative models (combinations of alternative decisions or parameters in the different steps necessary to build the source model), estimate the weights, and then build the source model logic tree input file. This gives us complete freedom. We have never used uncertaintyType attributes, which would restrict us on which uncertainties to consider and how to consider them.

Imposing a limit on the total number of branches within a branching level is therefore a problem. For now we can handle it by performing different runs, then gather results and re-process them, but it is a pity.


I see, actually you are following a workflow which is not recommended.  I understand that the engine may not recognize all the typologies of uncertainties that you need, but the right thing to do is to add the missing uncertainty types. Just tell us what you need, we are willing to help on that front, because in recent versions of the engine adding new kinds of uncertainties is easy. On the front of raising the limit, I investigated and can raise it to 184 branches per branchset with little effort, but I would not raise it more than that. Would that be helpful or not?

           Michele

ilini...@gmail.com

unread,
Mar 14, 2022, 10:15:18 AM3/14/22
to OpenQuake Users
We are going to send you a mail with details on what we aim to achieve,
thanks a lot,
Céline
Reply all
Reply to author
Forward
0 new messages