Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_rxns doesn't work for many products #10

Open
zxdawn opened this issue Nov 26, 2020 · 0 comments · May be fixed by #11
Open

plot_rxns doesn't work for many products #10

zxdawn opened this issue Nov 26, 2020 · 0 comments · May be fixed by #11

Comments

@zxdawn
Copy link

zxdawn commented Nov 26, 2020

I have tried to use plot_rxns for the O3 product by python -m permm --gui test.mrg.nc.

Steps:
I selected nothing in the "Select Rectants" column and checked "AND", then chose O3 in the "Select Products" column.

Error info:

Traceback (most recent call last):
  File "/home/xin/miniconda3/envs/python37/lib/python3.8/tkinter/__init__.py", line 1883, in __call__
    return self.func(*args)
  File "/home/xin/miniconda3/envs/python37/lib/python3.8/site-packages/permm-1.0-py3.8.egg/permm/guis/SimpleTk.py", line 87, in execute
    getattr(self.mech, method)(**thiskwds)
  File "/home/xin/miniconda3/envs/python37/lib/python3.8/site-packages/permm-1.0-py3.8.egg/permm/core/Mechanism.py", line 597, in plot_rxns
    reactions = [(rxn.sum()[plot_spc], rxn) for rxn in reactions]
  File "/home/xin/miniconda3/envs/python37/lib/python3.8/site-packages/permm-1.0-py3.8.egg/permm/core/Mechanism.py", line 597, in <listcomp>
    reactions = [(rxn.sum()[plot_spc], rxn) for rxn in reactions]
AttributeError: 'str' object has no attribute 'sum'

I printed the reactions before the rxn.sum():

reactions = [(rxn.sum()[plot_spc], rxn) for rxn in reactions]

Here's the output:

['RXN_02', 'RXN_92', 'RXN_108']

This issue exists for many products (O, O3, H2O2, NO, etc).

@zxdawn zxdawn linked a pull request Nov 27, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant