Waztom / xchem-CAR

5 stars 0 forks source link

Bug: Reactions with one reactant and reactions with two reactants on the same step cause CAR to error out #95

Open MathewGolding opened 2 months ago

MathewGolding commented 2 months ago

CAR bug

When multi-step chemistry involves a reaction with only 1 reactant during a step and another reaction on the same step requires 2 reactants, CAR errors out as it in the case of the screenshot attached as it tries to read the circled reactants first then errors out as this reactant isn't part of the reaction and is incompatible It also errors out if these reactions with 2 steps are moved first as it then begins reading the reactions with only 1 reactant as having a second null reactant which breaks CAR causing a backend error of TypeError: cannot unpack non-iterable NoneType object This requires restarting CAR to fix

Suggested solution: have CAR read the reaction type and recipe first then decide whether it needs 1 or 2 reactants before proceeding

MathewGolding commented 4 weeks ago

Code reviewed and bug fixed