Skip to content

Open Food Facts api timeoutΒ #449

@kerbalcat-png

Description

@kerbalcat-png

Currently running the open food facts api python library from a flask server, getting a timeout error from open food facts:
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='world.openfoodfacts.org', port=443): Read timed out. (read timeout=10.0)

I am using the following code:

@app.route("/barcode/test", methods=["GET"])
def process_barcode_test():
api = openfoodfacts.API(user_agent="MyAwesomeApp/1.0")

code = barcode_read("crisps1.jpg")
results = api.product.get(code, fields=["categories_hierarchy"])

I am able to access the open food facts website and api myself just fine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions