TypeError: pop() takes no arguments (1 given)

1,085 views
Skip to first unread message

jlist9

unread,
Sep 4, 2012, 2:01:25 AM9/4/12
to mong...@googlegroups.com
Hi all,

I'm experimenting with MongoKit. I'm seeing errors when I did some
simple operation such as drop_database or drop_collection. 

>>> c.drop_database('test1')
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Dev\Python27\lib\site-packages\pymongo\connection.py", line 1060, in drop_database
    self[name].command("dropDatabase")
  File "C:\Dev\Python27\lib\site-packages\pymongo\database.py", line 388, in command
    result = self["$cmd"].find_one(command, **extra_opts)
  File "C:\Dev\Python27\lib\site-packages\pymongo\collection.py", line 516, in find_one
    for result in self.find(spec_or_id, *args, **kwargs).limit(-1):
  File "C:\Dev\Python27\lib\site-packages\mongokit\cursor.py", line 42, in next
    next = db._fix_outgoing(self._Cursor__data.pop(0), self._Cursor__collection, wrap=self.__wrap)
TypeError: pop() takes no arguments (1 given)

I searched the error in the group and found another user asking a question
yesterday about the same error, although in a different use case. 


The error is about this line in cursor.py:

next = db._fix_outgoing(self._Cursor__data.pop(0), self._Cursor__collection, wrap=self.__wrap)

I'm using pymongo 2.3 and mongokit 0.8 on Python 2.7 on Windows. Any idea why this is happening?

Thanks,
Jack

Nicolas Clairon

unread,
Sep 4, 2012, 6:35:46 AM9/4/12
to mong...@googlegroups.com
Hi,

I've just fixed it in the new release v0.8.1. Upgrade Mongokit and it
should be all fine.

N.

jlist9

unread,
Sep 4, 2012, 11:53:47 AM9/4/12
to mong...@googlegroups.com
Thank you for the super fast fix!
Reply all
Reply to author
Forward
0 new messages