0

奇怪的是,这个问题是间歇性的,上次出现时它持续了几天,然后由于某种原因停止发生,今天在让 shopify 调查另一个问题时,我的库存更新脚本停止处理同样的 ole 错误。违规行似乎是

variant = Variant.objects.get(sku=sku)

sku 变量正在成功传递。我想强调的是,这个脚本在它工作了几个月之间没有被修改过,除了那个时期的 4 次出现这个错误和今天。显然 url 格式错误,但为什么会这样呢?

- 追溯 - -

Internal Server Error: /inventory/process/
Traceback (most recent call last):
  File "/home/username/.virtualenvs/projectname/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/username/.virtualenvs/projectname/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/home/username/projects/projectname/reponame/apps/shopified/views.py", line 103, in process
    update(sku, quantity)
  File "/home/username/projects/projectname/reponame/apps/shopified/inventory.py", line 72, in update
    inventory_quantity=quantity)).save()
  File "/home/username/.virtualenvs/projectname/local/lib/python2.7/site-packages/pyactiveresource/activeresource.py", line 775, in save
    data=self.to_xml())
  File "/home/username/.virtualenvs/projectname/local/lib/python2.7/site-packages/pyactiveresource/connection.py", line 351, in put
    return self._open('PUT', path, headers=headers, data=data)
  File "/home/username/.virtualenvs/projectname/local/lib/python2.7/site-packages/shopify/base.py", line 19, in _open
    self.response = super(ShopifyConnection, self)._open(*args, **kwargs)
  File "/home/username/.virtualenvs/projectname/local/lib/python2.7/site-packages/pyactiveresource/connection.py", line 287, in _open
    http_response = self._handle_error(err)
  File "/home/username/.virtualenvs/projectname/local/lib/python2.7/site-packages/pyactiveresource/connection.py", line 407, in _handle_error
    raise ResourceNotFound(err)
ResourceNotFound: Not Found: https://shop-name.myshopify.com/admin//variants/288274264.xml
4

0 回答 0