View are not view but string
- Dominant language
- Python
- Stars
- 263
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
emailcouchs = Email.view('email/all')
print emailcouchs
print emailcouchs.count()
so it give me this error :
Traceback (most recent call last):
File "saveemailpa.py", line 67, in
print emailcouchs.count()
File "/usr/local/lib/python2.7/dist-packages/couchdbkit/client.py", line 973, in count
self._fetch_if_needed()
File "/usr/local/lib/python2.7/dist-packages/couchdbkit/client.py", line 1004, in _fetch_if_needed
self.fetch()
File "/usr/local/lib/python2.7/dist-packages/couchdbkit/client.py", line 987, in fetch
self._total_rows = self._result_cache.get('total_rows')
AttributeError: 'str' object has no attribute 'get'
the latest with pip version with
and with your instruction :
Traceback (most recent call last):
File "/home/bussiere/saveemail/testcouchdb.py", line 13, in
emailcouchs = Email.view('email/all')
File "/usr/local/lib/python2.7/dist-packages/couchdbkit/schema/base.py",
line 585, in view
db = cls.get_db()
File "/usr/local/lib/python2.7/dist-packages/couchdbkit/schema/base.py",
line 422, in get_db
raise TypeError("doc database required to save document")
TypeError: doc database required to save document
[Finished in 0.6s]
Regards and thanks.
Bussiere
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.