Re: [mongodb-user] motor unusable after

63 views
Skip to first unread message

Bernie Hackett

unread,
May 17, 2013, 2:44:32 PM5/17/13
to mongod...@googlegroups.com
Hi, Motor 0.1 won't work with PyMongo 2.5.1. Roll back to PyMongo 2.5. There are more details here:



On Fri, May 17, 2013 at 11:23 AM, Y Ba <yba...@gmail.com> wrote:

Hi,

Today I accidentally deleted my virtualenv folder... I recreated it, but since then I can't use my app that uses the motor driver. That's strange because it worked just fin with the old virtualenv.

See what happens when I try with an exemple from the motor website: 

$ python test_motor.py 
Traceback (most recent call last):
  File "test_motor.py", line 52, in <module>
    db = motor.MotorClient().open_sync().test
Fri May 17 20:08:25.785 [initandlisten] connection accepted from 127.0.0.1:53909 #1 (1 connection now open)
  File "/home/yb/code/venv/lib/python2.7/site-packages/motor/__init__.py", line 792, in open_sync
    self._open(callback)
  File "/home/yb/code/venv/lib/python2.7/site-packages/motor/__init__.py", line 741, in _open
    gr.switch()
SystemError: error return without exception set

open method in motor/__init__.py is this:

    def _open(self, callback):
        check_callable(callback)

        if self.delegate:
            # Already open
            if callback:
                self.io_loop.add_callback(
                    functools.partial(callback, self, None))
            return

        def _connect():
            # Run on child greenlet
            error = None
            try:
                args, kwargs = self._delegate_init_args()
                self.delegate = self.__delegate_class__(*args, **kwargs)
            except Exception, e:
                error = e

            if callback:
                # Schedule callback to be executed on main greenlet, with
                # (self, None) if no error, else (None, error)
                self.io_loop.add_callback(
                    functools.partial(
                        callback, None if error else self, error))

        # Actually connect on a child greenlet
        gr = greenlet.greenlet(_connect)
        gr.switch()

Here are the packages versions I have installed in thie new virtual environment, they are the exact same I had before:

(venv) $ pip freeze
greenlet==0.4.0
motor==0.1
pymongo==2.5.1
tornado==3.0.1
wsgiref==0.1.2

Can someone tell me what's wrong ?

--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
 
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Y Ba

unread,
May 17, 2013, 3:55:04 PM5/17/13
to mongod...@googlegroups.com

Thanks for the tip.
But it doesn't work, same problem with pymongo 2.5.0.

I recreated the virtual env on another machine and I don't have this problem, even with pymongo 2.5.1... 

aliane abdelouahab

unread,
May 17, 2013, 5:39:57 PM5/17/13
to mongodb-user
maybe the problem come from greenlet:
gr = greenlet.greenlet(_connect)


On 17 mai, 20:55, Y Ba <yba...@gmail.com> wrote:
> Thanks for the tip.
> But it doesn't work, same problem with pymongo 2.5.0.
>
> I recreated the virtual env on another machine and I don't have this
> problem, even with pymongo 2.5.1...
>
> Le vendredi 17 mai 2013 20:44:32 UTC+2, Bernie Hackett a écrit :
>
>
>
>
>
>
>
>
>
> > Hi, Motor 0.1 won't work with PyMongo 2.5.1. Roll back to PyMongo 2.5.
> > There are more details here:
>
> >https://groups.google.com/d/msg/python-tornado/xEpZ_NU5eDE/D_bU2I7peFgJ
>
> >> To post to this group, send email to mongod...@googlegroups.com<javascript:>
> >> To unsubscribe from this group, send email to
> >> mongodb-user...@googlegroups.com <javascript:>
> >> See also the IRC channel -- freenode.net#mongodb
>
> >> ---
> >> You received this message because you are subscribed to the Google Groups
> >> "mongodb-user" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an
> >> email to mongodb-user...@googlegroups.com <javascript:>.
> >> For more options, visithttps://groups.google.com/groups/opt_out.

A. Jesse Jiryu Davis

unread,
May 18, 2013, 10:44:19 AM5/18/13
to mongod...@googlegroups.com
I've made a bug-report to track this issue. Can you please make an account on jira.mongodb.org and add a comment to this ticket?:


Please tell me what OS you're using, what version of Python (python --version). If you can recreate the virtualenv on the same machine as the one with the problem, and you can reproduce the SystemError, I'd love to see the printout of the steps you took.

A. Jesse Jiryu Davis

unread,
May 19, 2013, 7:21:22 PM5/19/13
to mongod...@googlegroups.com
One possibility is a bug when greenlet is compiled with GCC 4.8:


Can you please post the output of gcc --version, as well as uname -a?

Yann Basly

unread,
May 20, 2013, 5:01:40 AM5/20/13
to mongod...@googlegroups.com
Hi,

I answered in a comment in the bug report you created.

For short, yes, gcc 4.8, linux 3.8.11 (archlinux), python 2.7.4


2013/5/20 A. Jesse Jiryu Davis <je...@10gen.com>
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/vKkEmBFiznQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.

A. Jesse Jiryu Davis

unread,
Jun 3, 2013, 11:14:09 AM6/3/13
to mongod...@googlegroups.com
We've determined this is https://github.com/python-greenlet/greenlet/issues/28 for sure.
Reply all
Reply to author
Forward
0 new messages