-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example code does not work #15
Comments
I am also having this issue, but running client.product_attribute_set.list()
|
It doesn't work on Python 3.5 and above, because |
I'm getting the same error as @adamlwgriffiths . I'm also running python 2.7 so I don't think that @Talv comment applies to me. Has anyone found a solution? |
I can get it to work on my local machine but it won't run on my server. I get the error: On my local machine it returns the products as expected. Any idea? |
SOLUTION: catalog.py, checkout.py, customer.py, and directory.py are inside the magento directory so edit each of these files like so... Change: Everything works great. Thanks. |
The SOLUTION suggested by @hankmoody801 is not working at all. The previous metaclass assignments in Python3 are all ignored. |
@aLoneStrider...I made the change you suggested and I am still getting the same error. Any help would be much appreciated. Thanks in advance.
|
In line 60 of api.py I added ", metaclass = ClientApiMeta" (no need to add a comment with # in line 64) and the "AttributeError: 'API' object has no attribute 'product_attribute_set'" error has been solved. I am running the script with Python 3.4.5, created in an Anaconda environment, Win10 OS, and Magento 1.9.3.7 Original code line 60 of api.py:
Final corrected code:
Thanks for the solution and thank you very much for the Magento Python API module! |
No solution provided here so far has helped me to get anything from the api. I ended up using the "Old way" and it seems to work fine. |
I had the same problem originally, but this seemed to have solved the issue. I did a quick test and listed my products. On to do more testing! Thanks to all of you that figured it out! |
|
I need help |
Running the demo on the README with the latest Pypi release causes an error:
The API class does not have a
product
attribute.The text was updated successfully, but these errors were encountered: