LCA-ActivityBrowser / activity-browser

GUI for brightway2
GNU Lesser General Public License v3.0
134 stars 50 forks source link

Parameter values can not be changed and are not properly calculated in the activity formulas #1230

Open cfstudent2024 opened 4 months ago

cfstudent2024 commented 4 months ago

Updating AB

What happened?

When I wanted to change the amount of the defined parameters an error message pops up (see screenshot) and the previously shown value remains in the Amount field. The terminal did not show any code.

screenshot

Furthermore, the AB created "dummy" parameters in the Activity section. This caused the issue that stored formulas in the activities are not properly calculating and only the value 1 is displayed.

I tried to update the AB by using conda activate ab conda update activity-browser My antivirus scanner blocked loading some data. Now I can't open the AB userface and the following code appears in the terminal.

screenshot 1

What can I due?

Relevant errors

No response

Operating system

Windows 10

Conda environment

(base) C:\Users\Christina>conda activate ab

(ab) C:\Users\Christina>activity-browser
Unable to create process using 'C:\Users\Christina\miniconda3\envs\ab\python.exe C:\Users\Christina\miniconda3\envs\ab\Scripts\activity-browser-script.py '

(ab) C:\Users\Christina>
MaximeAgez commented 3 months ago

HI @cfstudent2024.

From what I've experienced on AB, this kind of error means your SQL database "parameters.db" is corrupted. So you would need to go into that database and execute SQL statements within it to delete the parameters that creates problems.

This often stems from the fact that when you delete entire databases (and not deleting each activity) not all parameter information is deleted properly. Notably, the parameter group are not deleted properly. And since in brightway only one parameter group can exist per activity, whenever it's not deleted properly and you are trying to create a database with the same name as the one you just deleted, it creates conflicts, hence the error.