LCA-ActivityBrowser / activity-browser

GUI for brightway2
GNU Lesser General Public License v3.0
149 stars 57 forks source link

Cannot change parameters in a project #441

Closed MaximeAgez closed 4 years ago

MaximeAgez commented 4 years ago

Hello. I am reporting a bug for a colleague that is not on Github. I do not have first hand information on the bug. I at least have screenshots of the error and a bit of the context in which the bug occurred.

Description of the bug: Parameters (project, database and activity) in the "parameters/definition" tab cannot be modified anymore, neither renamed or changing the value. The SQL query fails triggering an error. This happens at the project level.

My colleague told me they did not go into brightway (no operation with the source code) and only stayed on the activity-browser.

I think this is a rather major bug as it forced my colleague to delete the project and restart it from scratch. We could not pinpoint the potential action(s) that caused the bug unfortunately.

View in AB: Note that Pyrolyse(réacteur) was an activity created in another database than the one shown on the screenshot. The screenshot was taken when we tried modifying a parameter in a blank database. Deleting the activity Pyrolyse(réacteur) from the database still triggers an error at the project level. image

View in conda: image

dgdekoning commented 4 years ago

Hello @MaximeAgez,

Parameters failing like that is a massive issue. Can you say which version of the AB you and your colleague are using? A fix for ActivityParameters not being deleted when the related Activity was removed (#426) was added in version 2.6. This fix won't correct already existing problems but it should stop them from occurring again.

It looks like your issue is the opposite: An activity parameter was deleted some time ago, but is still in use by either other activity parameters or the parameterized exchanges of the activity.

I'm definitely looking into this as soon as possible.

MaximeAgez commented 4 years ago

Hi @dgdekoning,

the version used is 2.6.0.1