我有一个 shopify 商店和一个用 django 编写的管理应用程序。python api 运行良好。但是,我还没有探索过使用“订单”。这是我尝试过的,但我得到了一个错误......知道为什么 - 以及如何解决?
>>> 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'