0
我有一個Shopify商店和一個用django編寫的管理員應用程序。 python api運行良好。但是,我還沒有探索與「訂單」的工作。這是我嘗試的,我得到的錯誤......任何想法爲什麼 - 以及如何解決?shopify.Order.find(id = 1400)返回錯誤?任何想法可能是錯誤的?
>>> o = shopify.Order.find(id=1402)
錯誤:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/pyactiveresource/activeresource.py", line 351, in find
return cls._find_every(from_=from_, **kwargs)
File "/Library/Python/2.7/site-packages/pyactiveresource/activeresource.py", line 490, in _find_every
prefix_options)
File "/Library/Python/2.7/site-packages/pyactiveresource/activeresource.py", line 521, in _build_list
resources.append(cls(element, prefix_options))
File "/Library/Python/2.7/site-packages/shopify/base.py", line 133, in __init__
return super(ShopifyResource, self).__init__(attributes, prefix_options)
File "/Library/Python/2.7/site-packages/pyactiveresource/activeresource.py", line 328, in __init__
self._update(attributes)
File "/Library/Python/2.7/site-packages/pyactiveresource/activeresource.py", line 904, in _update
attr = [klass(child) for child in value]
File "/Library/Python/2.7/site-packages/shopify/base.py", line 133, in __init__
return super(ShopifyResource, self).__init__(attributes, prefix_options)
File "/Library/Python/2.7/site-packages/pyactiveresource/activeresource.py", line 328, in __init__
self._update(attributes)
File "/Library/Python/2.7/site-packages/pyactiveresource/activeresource.py", line 904, in _update
attr = [klass(child) for child in value]
File "/Library/Python/2.7/site-packages/shopify/base.py", line 132, in __init__
prefix_options, attributes = self.__class__._split_options(attributes)
File "/Library/Python/2.7/site-packages/pyactiveresource/activeresource.py", line 431, in _split_options
for key, value in options.iteritems():
AttributeError: 'str' object has no attribute 'iteritems'