Code Monkey home page Code Monkey logo

Comments (9)

teolemon avatar teolemon commented on June 14, 2024

nope, no account needed, it might be related to an API change, possibly

from openfoodfacts-python.

MahmoudHamdy02 avatar MahmoudHamdy02 commented on June 14, 2024

I have tried downloading the code and importing the module locally, and get_ingredients works normally.
image

from openfoodfacts-python.

MahmoudHamdy02 avatar MahmoudHamdy02 commented on June 14, 2024

It seems that the issue is coming from this if statement
image
When it is commented out, it works normally, however this __init__.py file (in python's installed modules folder) is not the same as the file in this repo.

from openfoodfacts-python.

teolemon avatar teolemon commented on June 14, 2024

@MahmoudHamdy02 I believe the PyPi version is very old. I've opened a PR to allow automated publication. Meanwhile, we need to fix this

from openfoodfacts-python.

itsmemala avatar itsmemala commented on June 14, 2024

Hi,

I have been able to get it to work after downloading and importing the module locally. However, it seems to return exactly 10000 ingredients - is this the full list of ingredients or is this a limit of the function?

from openfoodfacts-python.

MahmoudHamdy02 avatar MahmoudHamdy02 commented on June 14, 2024

I have tried looking the code and this how I think it works.

If you use the python module (e.g. get_packaging()) it grabs the data from the website through a link, (https://world.openfoodfacts.org/packaging.json in this case). I have tried downloading the data manually from the browser and it was also 10000 rows, so the issue is that the website API/backend only returns 10000 rows in the response.

from openfoodfacts-python.

itsmemala avatar itsmemala commented on June 14, 2024

Ah I see, I expected that. Is there any way to modify the python module to extract all ingredients?

from openfoodfacts-python.

MahmoudHamdy02 avatar MahmoudHamdy02 commented on June 14, 2024

I suspect the issue is coming from the python folksonomy API not the python module, but I'm still looking into it though.

from openfoodfacts-python.

aadarsh-ram avatar aadarsh-ram commented on June 14, 2024

@itsmemala The issue arised due to a old release stuck in PyPI. With PR #88, a new release (0.1.3) has been published to PyPI which solves this issue. Please do close this issue after verification.

from openfoodfacts-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.