You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got this error when I accessed /admin page.
Solution first:
In method __iter() of class MongoTable, mongodb_backend.py:
Replace line 53
r = self._coll.find(fields=[self.key_name,])
with
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/bottle.py", line 862, in _handle
return route.call(*_args)
File "/usr/lib64/python2.7/site-packages/bottle.py", line 1732, in wrapper
rv = callback(_a, *_ka)
File "/usr/lib64/python2.7/site-packages/bottle.py", line 3615, in wrapper
result = func(_args, **kwargs)
File "blog.py", line 169, in admin
for i in tu:
File "/usr/lib64/python2.7/site-packages/cork/cork.py", line 314, in list_users
for un in sorted(self._store.users):
File "/usr/lib64/python2.7/site-packages/cork/mongodb_backend.py", line 53, in iter
r = self._coll.find(fields=[self._key_name,]) #debug
File "/usr/lib64/python2.7/site-packages/pymongo/collection.py", line 929, in find
return Cursor(self, _args, *_kwargs)
TypeError: init() got an unexpected keyword argument 'fields'
The text was updated successfully, but these errors were encountered:
I got this error when I accessed /admin page.
Solution first:
In method __iter() of class MongoTable, mongodb_backend.py:
Replace line 53
r = self._coll.find(fields=[self.key_name,])
with
r = self._coll.find( { self.key_name : { '$exists': True } } )
Here is traceback:
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/bottle.py", line 862, in _handle
return route.call(*_args)
File "/usr/lib64/python2.7/site-packages/bottle.py", line 1732, in wrapper
rv = callback(_a, *_ka)
File "/usr/lib64/python2.7/site-packages/bottle.py", line 3615, in wrapper
result = func(_args, **kwargs)
File "blog.py", line 169, in admin
for i in tu:
File "/usr/lib64/python2.7/site-packages/cork/cork.py", line 314, in list_users
for un in sorted(self._store.users):
File "/usr/lib64/python2.7/site-packages/cork/mongodb_backend.py", line 53, in iter
r = self._coll.find(fields=[self._key_name,]) #debug
File "/usr/lib64/python2.7/site-packages/pymongo/collection.py", line 929, in find
return Cursor(self, _args, *_kwargs)
TypeError: init() got an unexpected keyword argument 'fields'
The text was updated successfully, but these errors were encountered: