Reputation: 39
I'm trying to use cloudant-python library in my application, but I'm not able to import the library itself as I'm getting ImportError: No module named document
as soon as I try to import anything from cloudant context. Following are details:
from cloudant.document import Document
OR
from cloudant.client import Cloudant
OR
from cloudant import Cloudant
The error is as follows:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cloudant.py", line 1, in <module>
from cloudant.document import Document
ImportError: No module named document
Upvotes: 0
Views: 892
Reputation: 39
The problem solved as I corrected very silly mistake, I named my script file as cloudant.py
so instead of looking for cloudant.__something__
in library package it was searching the same script file, duh!
Upvotes: 1