Mendeley / mendeley-python-sdk

Python SDK for the Mendeley API.
Apache License 2.0
119 stars 59 forks source link

General import failure #14

Closed ghost closed 8 years ago

ghost commented 8 years ago

I'm working on a django app using the mendeley api. I've done the following:

$ pip install mendeley

In my code, simplified:

from mendeley import Mendeley

I get the error, "Cannot import name 'Mendeley'" I have tried this upper-case, lower-case, tried just importing mendeley without the "from" (which works, but I can't figure out how to refer to anything beyond that. I'm happy to help or fix the docs when I figure out what's wrong, but I'm stuck before I've done anything.

mfschmidt commented 8 years ago

My problem was that I called my own django app "mendeley" so when I imported mendeley, I got my own app instead of the external one I wanted. To avoid this namespace clash, I renamed my own app and all was fine.

Joyce-Stack commented 8 years ago

Thank you for the feedback on this. I will now close this issue.