I've enabled development mode on the epos.isl instance for the MaxMagnitude app. You can find the app, along with its input data, in the Test user directory:
Built-in version (from the artifact) — this should reproduce the 'NoneType' object is not subscriptable error
Development branch:official-apps/MaxMagnitudeDPModels/BRANCH/bugfix/ISEPOS-2325-fix-nontype-object-bug — this version includes the bugfix
I've enabled development mode on the `epos.isl` instance for the **MaxMagnitude** app. You can find the app, along with its input data, in the **Test** user directory:
-> [TicketReproduceData/ISEPOS-2325/84. MaxMagnitudeDPModels](https://epos.insilicolab-dev.grid.cyfronet.pl/?lang=en#workspace:TicketReproduceData/ISEPOS-2325/84.%20MaxMagnitudeDPModels)
To test the changes, try switching between:
- **Built-in version** (from the artifact) — this should reproduce the `'NoneType' object is not subscriptable` error
- **Development branch:** `official-apps/MaxMagnitudeDPModels/BRANCH/bugfix/ISEPOS-2325-fix-nontype-object-bug` — this version includes the bugfix
With this setting, if you don't check any of the options in the interface, the app gets executed properly, but for the user it looks like it was without any b option selected, while underneath something is selected, and the user doesn't know about it. I wouldn't set this option here, and let the error be comunicated from the app (that nothing was selected). In this way we'll be consistent with what is shown in the interface.
Then, to avoid the error altogether, in the interface we should validate the field to ensure something is selected.
With this setting, if you don't check any of the options in the interface, the app gets executed properly, but for the user it looks like it was without any b option selected, while underneath something is selected, and the user doesn't know about it. I wouldn't set this option here, and let the error be comunicated from the app (that nothing was selected). In this way we'll be consistent with what is shown in the interface.
Then, to avoid the error altogether, in the interface we should validate the field to ensure something is selected.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Raise error if there is no b_method set: raise ValueError("Please chose an option for b-value")
I've enabled development mode on the
epos.islinstance for the MaxMagnitude app. You can find the app, along with its input data, in the Test user directory:-> TicketReproduceData/ISEPOS-2325/84. MaxMagnitudeDPModels
To test the changes, try switching between:
'NoneType' object is not subscriptableerrorofficial-apps/MaxMagnitudeDPModels/BRANCH/bugfix/ISEPOS-2325-fix-nontype-object-bug— this version includes the bugfix@@ -38,3 +38,3 @@parser.add_argument("--ssd", help="Static stress drop (in Pa).", type=float, default=3000000)parser.add_argument("--C", help="Geometrical constant.", type=float, default=0.95)parser.add_argument("--b_value_type", help="b-value type: parameter of type 'TEXT'", action='append')parser.add_argument("--b_value_type", help="b-value type: parameter of type 'TEXT'", action='append', default="b")With this setting, if you don't check any of the options in the interface, the app gets executed properly, but for the user it looks like it was without any b option selected, while underneath something is selected, and the user doesn't know about it. I wouldn't set this option here, and let the error be comunicated from the app (that nothing was selected). In this way we'll be consistent with what is shown in the interface.
Then, to avoid the error altogether, in the interface we should validate the field to ensure something is selected.
Ok, I removed default value from
maxmagnitude_wrapper.pyand I will add validation to form field