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
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")
I am able to access the open food facts website and api myself just fine