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 am not even sure how to replicate this, but tracing, _load is getting a list as the second argument that
contains the actual match:
id is: 2
data is: [{"username": "alfredo", "secret": "secret", "_id": 1}]
Traceback (most recent call last):
File "/Users/alfredo/.virtualenvs/wari/bin/wari", line 10, in <module>
execfile(__file__)
File "/Users/alfredo/python/wari/bin/wari", line 6, in <module>
main.Wari()
File "/Users/alfredo/python/wari/wari/main.py", line 35, in __init__
self.main(argv)
File "/Users/alfredo/python/wari/wari/decorators.py", line 45, in newfunc
return f(*a, **kw)
File "/Users/alfredo/python/wari/wari/main.py", line 57, in main
parser.dispatch()
File "/Users/alfredo/.virtualenvs/wari/lib/python2.7/site-packages/tambo-0.0.8-py2.7.egg/tambo/dispatcher.py", line 18, in dispatch
return instance.parse_args()
File "/Users/alfredo/python/wari/wari/hotp.py", line 83, in parse_args
return self.remove(parser.get('remove'))
File "/Users/alfredo/python/wari/wari/hotp.py", line 106, in remove
documents = db.collection.find({'username': username}, limit=1)
File "/Users/alfredo/python/otp/nosqlite/nosqlite.py", line 185, in find
for match in ifilter(apply, starmap(self._load, cursor.fetchall())):
File "/Users/alfredo/python/otp/nosqlite/nosqlite.py", line 170, in _load
document['_id'] = id
TypeError: list indices must be integers, not str
The text was updated successfully, but these errors were encountered:
alfredodeza
changed the title
if the collection is empty a TypeError is raised when using findTypeError is raised when using findOct 30, 2014
I'll probably want to add in some level of checking about the argument given to .insert(). My thoughts right now is that .insert() would have the following behavior
foo.insert({'foo': 'bar'}) # inserts a single document
foo.insert([{'foo': 'bar'}, {'baz': 'qux'}]) # inserts two documents
foo.insert({'foo': 'bar'}, {'baz': 'qux'}) # inserts two documents
Thoughts?
plutec
pushed a commit
to plutec/nosqlite
that referenced
this issue
Aug 25, 2016
I am not even sure how to replicate this, but tracing,
_load
is getting a list as the second argument thatcontains the actual match:
The text was updated successfully, but these errors were encountered: