LCA-ActivityBrowser / activity-browser

GUI for brightway2
GNU Lesser General Public License v3.0
152 stars 58 forks source link

Create parameters in activity failed when project parameters still existing #595

Open LaureParigot opened 3 years ago

LaureParigot commented 3 years ago

If I try to create a new parameter for an activity and some parameters are still entering in the formula (parameters coming from projet node), no parameter is created and an error occured in the command line Snapshot is joined.

So how to correct parameters from project to activity in case of wrong creation ?

StpdFox commented 3 years ago

Hey LaurParigot, First off, sorry for the late response,. The snapshot didnt seem included in your comment. Could you retry ?;) When i try to create a new parameter for an activity with existing parameters in the formula it just creates a new parameter. Could you explain the steps you take to get to this error?

LaureParigot commented 3 years ago

Hi Matthijs,

No worries, thank you for your reply. Hope the description and the attached images are helpful.

Thank you for your feedback Laure

Here is the process I followed.

All the parameters defined are not project parameters but more activities parameters then I would like to create an activity parameter and to use it rather than the one in my project.

Traceback (most recent call last): File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\activity_browser\controllers\parameter.py", line 49, in add_parameter bw.parameters.new_activity_parameters([data], group) File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\bw2data\parameters.py", line 1385, in new_activity_parameters ActivityParameter.insert_many(data[idx:idx+100]).execute() File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\peewee.py", line 1796, in inner return method(self, database, *args, *kwargs) File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\peewee.py", line 1867, in execute return self._execute(database) File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\peewee.py", line 2599, in _execute return super(Insert, self)._execute(database) File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\peewee.py", line 2336, in _execute cursor = database.execute(self) File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\peewee.py", line 2994, in execute return self.execute_sql(sql, params, commit=commit) File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\peewee.py", line 2988, in execute_sql self.commit() File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\peewee.py", line 2759, in exit reraise(new_type, new_type(exc_args), traceback) File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\peewee.py", line 183, in reraise raise value.with_traceback(tb) File "C:\ProgramData\Anaconda3\envs\ab_dev\lib\site-packages\peewee.py", line 2981, in execute_sql cursor.execute(sql, params or ()) peewee.IntegrityError: Cross group activity

[image: image.png]

[image: image.png]

--

Laure Parigot

DDMS - Design4Environment team

*IM - DPAA *People, Projects & Services

Airbus Operations SAS

Address: M29 C148 - 316 Route de Bayonne

31060 Toulouse cedex 09

Phone: +33 (0)5 61 18 28 72 / +33 (0)6 13 28 73 35

@. @.> The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.

LaureParigot commented 3 years ago

Matthijs,

Could you please confirm you received the email with description et snapshots ? I had some troubles with my email. Thank you Best regards Laure

On Wed, May 19, 2021 at 12:41 PM Matthijs Vos @.***> wrote:

Hey LaurParigot, First off, sorry for the late response,. The snapshot didnt seem included in your comment. Could you retry ?;) When i try to create a new parameter for an activity with existing parameters in the formula it just creates a new parameter. Could you explain the steps you take to get to this error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LCA-ActivityBrowser/activity-browser/issues/595#issuecomment-843977969, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARQWDROX3DY6IT3W5WS45RDTOOIW5ANCNFSM44EIO4KQ .

--

Laure Parigot

*DDMS - Design4Environment team (*https://sites.google.com/airbus.com/environmentinairframe/ecodesign-lca-coordination-group https://sites.google.com/airbus.com/environmentinairframe/ecodesign-lca-coordination-group)

*IM - DPAA *People, Projects & Services

Airbus Operations SAS

Address: M29 C148 - 316 Route de Bayonne

31060 Toulouse cedex 09

Phone: +33 (0)5 61 18 28 72 / +33 (0)6 13 28 73 35

@. @.> The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.