Replies: 1 comment 7 replies
-
The error seems to be from PyBaMM only, so the other packages and the environment should hopefully not affect it. From what we discussed in the other issue, the problem seemed to be with |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am in the process of attempting to install pybamm into a new environment. However, I keep coming across the following error no matter what installation method I have attempted. I know for a fact that the issue does not arise from the file I have been as running as to runs just fine in a different pybamm environment that I have available. I have included the entire error trace back and would appreciate any advice that you could provide on ways that I could potentially fix this issue.
This is the list of packages that I currently have included in my environment:
name: pybamm
channels:
dependencies:
Error traceback
Python 3.10.11 | packaged by Anaconda, Inc. | (main, Apr 20 2023, 18:56:50) [MSC v.1916 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 8.12.0 -- An enhanced Interactive Python.
runfile('C:/Users/natha/Desktop/Code/main.py', wdir='C:/Users/natha/Desktop/Code')
['DigiElech/2023-06-26 solution/CV/CV_k0_10000_R_800_Cd_1e-9_Ds_2e-5_Dp_1.5e-5.txt', 0.001, 1e-05, 2023.0, -6.0, -26.0, 0.0, 10000.0, 800.0, 1e-09, 2e-05, 1.5e-05]
Traceback (most recent call last):
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:497 in process_symbol
return self._processed_symbols[symbol]
KeyError: Subtraction(-0x887745c55906d0f, -, children=['Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]) + (time <= (Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))) * -time + ((Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) < time) * (time - (2.0 * ((Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))))) - (Uncompensated Resistance [Ohm] * Faraday Constant [C mol-1] * Electrode Area [cm2] * Far-field concentration of S(soln) [mol cm-3] * sqrt(Diffusion Coefficient of S [cm2 s-1]) * sqrt(Faraday Constant [C mol-1] * Scan Rate [V s-1] / (Gas constant [J K-1 mol-1] * Temperature [K])) / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]) * (Redox Rate [s-1] * sqrt((Gas constant [J K-1 mol-1] * Temperature [K] * Diffusion Coefficient of S [cm2 s-1] / Faraday Constant [C mol-1]) * Scan Rate [V s-1]) / Diffusion Coefficient of S [cm2 s-1] * ((boundary value(P(soln) [non-dim]) * exp((1.0 - Symmetry factor [non-dim]) * (Effective Voltage [non-dim] - (Reversible Potential [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))))) - (boundary value(S(soln) [non-dim]) * exp(-Symmetry factor [non-dim] * (Effective Voltage [non-dim] - (Reversible Potential [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])))))) + Capacitance [F] * Electrode Area [cm2] * Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1] / (Faraday Constant [C mol-1] * Electrode Area [cm2] * Far-field concentration of S(soln) [mol cm-3] * sqrt(Diffusion Coefficient of S [cm2 s-1]) * sqrt(Faraday Constant [C mol-1] * Scan Rate [V s-1] / (Gas constant [J K-1 mol-1] * Temperature [K])) * Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1] / Scan Rate [V s-1]) * (((Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) < time) - (time <= (Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))))))', 'Effective Voltage [non-dim]'], domains={})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:497 in process_symbol
return self._processed_symbols[symbol]
KeyError: Subtraction(-0x36494c20ced37b63, -, children=['Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]) + (time <= (Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))) * -time + ((Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) < time) * (time - (2.0 * ((Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])))))', 'Uncompensated Resistance [Ohm] * Faraday Constant [C mol-1] * Electrode Area [cm2] * Far-field concentration of S(soln) [mol cm-3] * sqrt(Diffusion Coefficient of S [cm2 s-1]) * sqrt(Faraday Constant [C mol-1] * Scan Rate [V s-1] / (Gas constant [J K-1 mol-1] * Temperature [K])) / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]) * (Redox Rate [s-1] * sqrt((Gas constant [J K-1 mol-1] * Temperature [K] * Diffusion Coefficient of S [cm2 s-1] / Faraday Constant [C mol-1]) * Scan Rate [V s-1]) / Diffusion Coefficient of S [cm2 s-1] * ((boundary value(P(soln) [non-dim]) * exp((1.0 - Symmetry factor [non-dim]) * (Effective Voltage [non-dim] - (Reversible Potential [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))))) - (boundary value(S(soln) [non-dim]) * exp(-Symmetry factor [non-dim] * (Effective Voltage [non-dim] - (Reversible Potential [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])))))) + Capacitance [F] * Electrode Area [cm2] * Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1] / (Faraday Constant [C mol-1] * Electrode Area [cm2] * Far-field concentration of S(soln) [mol cm-3] * sqrt(Diffusion Coefficient of S [cm2 s-1]) * sqrt(Faraday Constant [C mol-1] * Scan Rate [V s-1] / (Gas constant [J K-1 mol-1] * Temperature [K])) * Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1] / Scan Rate [V s-1]) * (((Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) < time) - (time <= (Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])))))'], domains={})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:497 in process_symbol
return self._processed_symbols[symbol]
KeyError: Multiplication(0x28f5f51cf9799297, *, children=['Uncompensated Resistance [Ohm] * Faraday Constant [C mol-1] * Electrode Area [cm2] * Far-field concentration of S(soln) [mol cm-3] * sqrt(Diffusion Coefficient of S [cm2 s-1]) * sqrt(Faraday Constant [C mol-1] * Scan Rate [V s-1] / (Gas constant [J K-1 mol-1] * Temperature [K])) / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])', 'Redox Rate [s-1] * sqrt((Gas constant [J K-1 mol-1] * Temperature [K] * Diffusion Coefficient of S [cm2 s-1] / Faraday Constant [C mol-1]) * Scan Rate [V s-1]) / Diffusion Coefficient of S [cm2 s-1] * ((boundary value(P(soln) [non-dim]) * exp((1.0 - Symmetry factor [non-dim]) * (Effective Voltage [non-dim] - (Reversible Potential [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))))) - (boundary value(S(soln) [non-dim]) * exp(-Symmetry factor [non-dim] * (Effective Voltage [non-dim] - (Reversible Potential [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])))))) + Capacitance [F] * Electrode Area [cm2] * Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1] / (Faraday Constant [C mol-1] * Electrode Area [cm2] * Far-field concentration of S(soln) [mol cm-3] * sqrt(Diffusion Coefficient of S [cm2 s-1]) * sqrt(Faraday Constant [C mol-1] * Scan Rate [V s-1] / (Gas constant [J K-1 mol-1] * Temperature [K])) * Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1] / Scan Rate [V s-1]) * (((Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) < time) - (time <= (Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))))'], domains={})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:497 in process_symbol
return self._processed_symbols[symbol]
KeyError: Addition(-0x68cfe33ab0ae7fee, +, children=['Redox Rate [s-1] * sqrt((Gas constant [J K-1 mol-1] * Temperature [K] * Diffusion Coefficient of S [cm2 s-1] / Faraday Constant [C mol-1]) * Scan Rate [V s-1]) / Diffusion Coefficient of S [cm2 s-1] * ((boundary value(P(soln) [non-dim]) * exp((1.0 - Symmetry factor [non-dim]) * (Effective Voltage [non-dim] - (Reversible Potential [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))))) - (boundary value(S(soln) [non-dim]) * exp(-Symmetry factor [non-dim] * (Effective Voltage [non-dim] - (Reversible Potential [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))))))', 'Capacitance [F] * Electrode Area [cm2] * Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1] / (Faraday Constant [C mol-1] * Electrode Area [cm2] * Far-field concentration of S(soln) [mol cm-3] * sqrt(Diffusion Coefficient of S [cm2 s-1]) * sqrt(Faraday Constant [C mol-1] * Scan Rate [V s-1] / (Gas constant [J K-1 mol-1] * Temperature [K])) * Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1] / Scan Rate [V s-1]) * (((Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) < time) - (time <= (Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1]))))'], domains={})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:497 in process_symbol
return self._processed_symbols[symbol]
KeyError: Multiplication(0x1a37bf8b0c0a9d96, *, children=['Capacitance [F] * Electrode Area [cm2] * Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1] / (Faraday Constant [C mol-1] * Electrode Area [cm2] * Far-field concentration of S(soln) [mol cm-3] * sqrt(Diffusion Coefficient of S [cm2 s-1]) * sqrt(Faraday Constant [C mol-1] * Scan Rate [V s-1] / (Gas constant [J K-1 mol-1] * Temperature [K])) * Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1] / Scan Rate [V s-1])', '((Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) < time) - (time <= (Voltage start [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])) - (Voltage reverse [V] / (Gas constant [J K-1 mol-1] * Temperature [K] / Faraday Constant [C mol-1])))'], domains={})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\expression_tree\symbol.py:758 in evaluate_for_shape
return self._saved_evaluate_for_shape
AttributeError: 'Subtraction' object has no attribute '_saved_evaluate_for_shape'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\anaconda3\envs\pybamm\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\users\natha\desktop\code\main.py:143
main()
File c:\users\natha\desktop\code\main.py:96 in main
cmodel = cm.CatalyticModel(const_parameters,seioptions, atol, rtol, t_steps, x_steps)
File ~\Desktop\Code\catalyticmodel05.py:182 in init
param.process_model(model)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:341 in process_model
new_algebraic[new_variable] = self.process_symbol(equation)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:499 in process_symbol
processed_symbol = self._process_symbol(symbol)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:610 in _process_symbol
new_left = self.process_symbol(symbol.left)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:499 in process_symbol
processed_symbol = self._process_symbol(symbol)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:611 in _process_symbol
new_right = self.process_symbol(symbol.right)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:499 in process_symbol
processed_symbol = self._process_symbol(symbol)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:611 in _process_symbol
new_right = self.process_symbol(symbol.right)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:499 in process_symbol
processed_symbol = self._process_symbol(symbol)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:611 in _process_symbol
new_right = self.process_symbol(symbol.right)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:499 in process_symbol
processed_symbol = self._process_symbol(symbol)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\parameters\parameter_values.py:613 in _process_symbol
new_symbol = symbol._binary_new_copy(new_left, new_right)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\expression_tree\binary_operators.py:102 in _binary_new_copy
return self._binary_evaluate(left, right)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\expression_tree\binary_operators.py:273 in _binary_evaluate
return left * right
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\expression_tree\symbol.py:559 in mul
return pybamm.simplified_multiplication(self, other)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\expression_tree\binary_operators.py:967 in simplified_multiplication
if left.shape_for_testing == right.shape_for_testing and all(
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\expression_tree\symbol.py:942 in shape_for_testing
evaluated_self = self.evaluate_for_shape()
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\expression_tree\symbol.py:760 in evaluate_for_shape
self._saved_evaluate_for_shape = self._evaluate_for_shape()
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\expression_tree\binary_operators.py:114 in _evaluate_for_shape
return self._binary_evaluate(left, right)
File ~\anaconda3\envs\pybamm\lib\site-packages\pybamm\expression_tree\binary_operators.py:234 in _binary_evaluate
return left - right
TypeError: numpy boolean subtract, the
-
operator, is not supported, use the bitwise_xor, the^
operator, or the logical_xor function instead.Beta Was this translation helpful? Give feedback.
All reactions