Skip to content

Illegal division by zero at ProductOpener/Ingredients.pm - init_percent_values #8782

Closed

Description

One product is triggering an illegal division by zero.

updating product code: 3254560129979  (0 / 1)
Illegal division by zero at ProductOpener/Ingredients.pm line 2674.

                                # the specified percent of the ingredient is in fact in grams
                                # (when we parse the ingredients list, if we see a value in grams, we assign it to the percent field,
                                # as values are usually listed for 100g)
                                # we need to convert it to actual %
   ->                             my $percent = $ingredient_ref->{percent} * $total_max / $percent_sum;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

🐛 bugThis is a bug, not a feature request.🥗🔍 Ingredients analysishttps://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions