ERROR:app:Exception on /add [POST]
Traceback (most recent call last):
File "./app.py", line 136, in add
grocy.product_by_barcode(barcode)
File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy.py", line 102, in product_by_barcode
resp = self._api_client.get_product_by_barcode(barcode)
File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy_api_client.py", line 435, in get_product_by_barcode
parsed_json = self._do_get_request(url)
File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy_api_client.py", line 358, in _do_get_request
raise GrocyError(resp)
pygrocy.errors.grocy_error.GrocyError: <Response [400]>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "./app.py", line 147, in add
if add_product(good, client):
File "./app.py", line 54, in add_product
response_grocy = grocy.add_generic(EntityType.PRODUCTS, data_grocy)
File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy.py", line 368, in add_generic
return self._api_client.add_generic(entity_type.value, data)
File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy_api_client.py", line 783, in add_generic
return self._do_post_request(f"objects/{entity_type}", data)
File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy_api_client.py", line 375, in _do_post_request
raise GrocyError(resp)
pygrocy.errors.grocy_error.GrocyError: <Response [400]>
INFO:werkzeug:10.10.10.200 - - [06/Apr/2024 21:16:57] "POST /add HTTP/1.1" 500 -
在我进行批量物品导入测试时发现有一个产品创建条目正常,但是累加入库时出现了无故500报错,不清楚是否为获取到的GDSInfo内容触发了某个隐形BUG
产品ISBN:6907992513560
错误日志如下
GDSInfo信息: