Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

AttributeError: 'Cursor' object has no attribute '_Cursor__id' #4

Open
Smurf-IV opened this issue Jul 18, 2016 · 1 comment
Open

AttributeError: 'Cursor' object has no attribute '_Cursor__id' #4

Smurf-IV opened this issue Jul 18, 2016 · 1 comment

Comments

@Smurf-IV
Copy link

Traceback (most recent call last):
  File "Z:/spdaemon/app.py", line 184, in _runme
    message = self._jobqueue.next().get('data', None)
  File "Z:\Z_VirtualEnv\lib\site-packages\pymjq\jobqueue.py", line 42, in next
    tailable=True)
  File "Z:\Z_VirtualEnv\lib\site-packages\pymongo\collection.py", line 1137, in find
    return Cursor(self, *args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'tailable'
Exception ignored in: <bound method Cursor.__del__ of <pymongo.cursor.Cursor object at 0x0000000003918048>>
Traceback (most recent call last):
  File "Z:\Z_VirtualEnv\lib\site-packages\pymongo\cursor.py", line 214, in __del__
    if self.__id and not self.__killed:
AttributeError: 'Cursor' object has no attribute '_Cursor__id'

This is just in a client code daemon when calling
message = self._jobqueue.next().get('data', None)

Any Ideas ?

Python 3.4.4
Windows 8 x64
Latest MongoDb

@accraze
Copy link
Contributor

accraze commented Jul 19, 2016

Hey @Smurf-IV! I'm currently using Python 2.7.9 on MacOSX running MongoDB v2.6.8. so this might be an issue between the two versions of MongoDB. It looks like something has changed when we specify the tailable cursor https://github.com/discogs/pymongo-job-queue/blob/master/pymjq/jobqueue.py#L43

I'll try and take a look at it when I get some more time in about a week or so. If you figure anything out, feel free to send a PR :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants