Open trane opened 11 years ago
ok do you have an idea when gevent (version/commit) added this assertion check ?
Will plivoframework team plan to support gevent-1.0rc2? Is there any schedule?
Any chance you could make a note about this issue on this page http://docs.plivo.org/get-started/ ?
I'm new to Plivo, and it took me a while to find this issue and figure out I wasn't doing anything wrong...
I should have been more specific...
In it's current state, you can't install the plivo framework.
Within plivo_install.sh, there's these two lines:
pip install --upgrade -f http://gevent.googlecode.com/files/gevent-1.0a3.tar.gz gevent pip install -e git+${PLIVO_GIT_REPO}@${BRANCH}#egg=plivo
The first does install the older version of gevent, but the second triggers some dependency that installs the latest gevent due to some dependency...which renders the install broken due to this issue.
I tried working around it by doing a pip install of the older version, but that triggers a different gevent bug where it requires cython to do the build. That, in turns, fails because cython complains about "default encoding required for conversion" on one of the core files in plivo.
In short, again, at least on a debian box, you can't get a working install of plivo by running the simple "get started" install.
Is it still the same error : "AssertionError: Impossible to call blocking function in the event loop callback"
you see when using last gevent version ?
Yes, the same error. I tried it a few more times, and wrote up something with more detail on the Plivo-User's group, here;
https://groups.google.com/forum/#!topic/plivo-users/q3gdHEcDXsU
I was wrong in my assumption that the newer version of gevent was overwriting the older version. It's more straightforward than that. This line:
pip install --upgrade -f http://gevent.googlecode.com/files/gevent-1.0a3.tar.gz gevent
Does not install gevent-1.0a3.tar.gz...it grabs the lastest version of gevent. Must be something about how pip works internally?
Yes.
On 12/9/13 2:11 PM, Michael Ricordeau wrote:
Is it still the same error : "AssertionError: Impossible to call blocking function in the event loop callback"
you see when using last gevent version ?
— Reply to this email directly or view it on GitHub https://github.com/plivo/plivoframework/issues/96#issuecomment-30163240.
I finally hit on something that worked. I replaced this line in plivo_install.sh
pip install --upgrade -f http://gevent.googlecode.com/files/gevent-1.0a3.tar.gz gevent
With this:
pip uninstall gevent pip install -Iv http://gevent.googlecode.com/files/gevent-1.0a3.tar.gz
FYI, that -Iv switch above is a capital letter i, not a lowercase l. The font here on github isn't great for telling the difference.... I and l look the same.
And re-ran the installer. It does prompt me for confirmation during the install, but everything is working now, no "AssertionError: Impossible to call blocking function in the event loop callback" problems with inbound calls.
please refer to second commit of https://github.com/plivo/plivoframework/pull/108
I've downloaded last version of plivo source with cloning of git in plivo_install.sh I have problem that i think belongs to this issue. Any solution: 2014-01-21 17:00:00,821 plivo-outbound[3251]: INFO: (1) New request from ('127.0.0.1', 59134) 2014-01-21 17:00:00,823 plivo-outbound[3251]: DEBUG: (1) Execute: connect args='' 2014-01-21 17:00:00,827 plivo-outbound[3251]: ERROR: (1) Traceback (most recent call last): 2014-01-21 17:00:00,827 plivo-outbound[3251]: ERROR: (1) File "/usr/local/plivo/src/plivo/src/plivo/rest/freeswitch/outboundsocket.py", line 319, in run 2014-01-21 17:00:00,827 plivo-outbound[3251]: ERROR: (1) self._run() 2014-01-21 17:00:00,827 plivo-outbound[3251]: ERROR: (1) File "/usr/local/plivo/src/plivo/src/plivo/rest/freeswitch/outboundsocket.py", line 329, in _run 2014-01-21 17:00:00,828 plivo-outbound[3251]: ERROR: (1) self.connect() 2014-01-21 17:00:00,828 plivo-outbound[3251]: ERROR: (1) File "/usr/local/plivo/src/plivo/src/plivo/core/freeswitch/outboundsocket.py", line 54, in connect 2014-01-21 17:00:00,828 plivo-outbound[3251]: ERROR: (1) connect_response = self._protocol_send("connect") 2014-01-21 17:00:00,828 plivo-outbound[3251]: ERROR: (1) File "/usr/local/plivo/src/plivo/src/plivo/rest/freeswitch/outboundsocket.py", line 140, in _protocol_send 2014-01-21 17:00:00,828 plivo-outbound[3251]: ERROR: (1) command, args) 2014-01-21 17:00:00,829 plivo-outbound[3251]: ERROR: (1) File "/usr/local/plivo/src/plivo/src/plivo/core/freeswitch/eventsocket.py", line 375, in _protocol_send 2014-01-21 17:00:00,829 plivo-outbound[3251]: ERROR: (1) _uuid, event = _async_res.get() 2014-01-21 17:00:00,829 plivo-outbound[3251]: ERROR: (1) File "/usr/local/plivo/lib/python2.6/site-packages/gevent/event.py", line 226, in get 2014-01-21 17:00:00,829 plivo-outbound[3251]: ERROR: (1) result = self.hub.switch() 2014-01-21 17:00:00,830 plivo-outbound[3251]: ERROR: (1) File "/usr/local/plivo/lib/python2.6/site-packages/gevent/hub.py", line 330, in switch 2014-01-21 17:00:00,830 plivo-outbound[3251]: ERROR: (1) switch_out() 2014-01-21 17:00:00,830 plivo-outbound[3251]: ERROR: (1) File "/usr/local/plivo/lib/python2.6/site-packages/gevent/hub.py", line 334, in switch_out 2014-01-21 17:00:00,830 plivo-outbound[3251]: ERROR: (1) raise AssertionError('Impossible to call blocking function in the event loop callback') 2014-01-21 17:00:00,830 plivo-outbound[3251]: ERROR: (1) AssertionError: Impossible to call blocking function in the event loop callback 2014-01-21 17:00:00,831 plivo-outbound[3251]: DEBUG: (1) Releasing Connection ...
Just to confirm that BrightLedSigns' fix worked for me; I didn't have to rerun install.sh, just restarted the plivo processes.
Fixed it in #132
Testing an inbound call, with TRACE enabled succeeds with the gevent installed through pip.
However, it fails when using the newest gevent based off of libev.
This is using the newest code from the master branch of plivoframework.