mollie / mollie-api-python

Mollie API client for Python
http://www.mollie.com
BSD 2-Clause "Simplified" License
113 stars 55 forks source link

Import error when importing Mollie module #13

Closed kjeldGr closed 8 years ago

kjeldGr commented 8 years ago

When I import Mollie in my Python (3.4) project, I get an import error on "Resource", even though I haven't even used the api in my project yet. I also get the error when I try to run the example files. The full error is:

File "/home/< user >/< project_name >/< project_name >/views.py", line 3, in import Mollie File "<...>/Mollie/init.py", line 1, in File "<...>/Mollie/API/init.py", line 2, in File "<...>/Mollie/API/Resource/init.py", line 1, in File "<...>/Mollie/API/Resource/Base.py", line 1, in File "<...>/Mollie/API/Client.py", line 9, in ImportError: cannot import name 'Resource'

rmmr commented 8 years ago

Same here (python 2.7). Use pip install 'mollie-api-python<1.1.0' for a quick work around.

mollierobbert commented 8 years ago

There was a circular dependency issue that should have been solved now (https://github.com/mollie/mollie-api-python/commit/306e23dc4e1a10afae2054519d7f81cc81c204ba). Could you kindly check if it's working?

kjeldGr commented 8 years ago

yes it's fixed now! But the newest version isn't available for pip now.

mollierobbert commented 8 years ago

Great! Thanks Kjeld.

We wanted to be sure the issue was fixed before distributing it through pip. We've released it on pip just now.