FROM CACHE - en_header

Find product error REST ADMIN API

New Member
1 0 0

When I am trying to find product by id using find() 



getting error 

Traceback (most recent call last):
File "/home/***/venv/lib/python3.7/site-packages/celery/app/", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/***/venv/lib/python3.7/site-packages/celery/app/", line 650, in __protected_call__
return*args, **kwargs)
File "/home/***/src/api/v1_0_0/tasks/", line 159, in publish_product_on_shopify
new_product = shopify.Product().find(XXXXX)
File "/home/***/venv/lib/python3.7/site-packages/shopify/", line 211, in find
collection = super(ShopifyResource, cls).find(id_=id_, from_=from_, **kwargs)
File "/home/****/venv/lib/python3.7/site-packages/pyactiveresource/", line 384, in find
return cls._find_single(id_, **kwargs)
File "/home/***/venv/lib/python3.7/site-packages/pyactiveresource/", line 488, in _find_single
File "/home/****/venv/lib/python3.7/site-packages/pyactiveresource/", line 540, in _build_object
return cls(attributes, prefix_options)
File "/home/****/venv/lib/python3.7/site-packages/shopify/", line 181, in __init__
return super(ShopifyResource, self).__init__(attributes, prefix_options)
File "/home/****/venv/lib/python3.7/site-packages/pyactiveresource/", line 363, in __init__
File "/home/****/venv/lib/python3.7/site-packages/pyactiveresource/", line 977, in _update
TypeError: 'module' object is not callable


It was working fine 3...4 days back. but not now

I did not change any code.


Any help??

Replies 2 (2)
Shopify Staff
Shopify Staff
1098 146 221

Are you able to capture a request ID from the response headers, or provide the product ID?

Scott | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit or the Shopify Web Design and Development Blog

New Member
1 0 0

In Python , a script is a module, whose name is determined by the filename, you need to distinguish between module names and class names. So when you start out your file with import MyClass you are creating a loop in the module structure. This error 'module' object is not callable is raised as you are being confused about the Class name and Module name. The problem is in the import line . You are importing a module, not a class. This happend because the module name and class name have the same name .

If you have a class MyClass in a file called , then you should write:

from MyClass import MyClass