[asterisk-dev] ari-py websocket connection issue
Thomas McMahon
thmcmahon at gmail.com
Tue Jun 10 05:37:19 CDT 2014
Thanks Matthew, I tested this out and it fixed the error. For posterity
(and google's) sake, I created a fresh virtualenv and ran:
$ pip install requests==2.0.1
$ pip install websocket-client==0.12.0
$ pip install git+https://github.com/asterisk/ari-py.git
Then example.py ran fine.
On Mon, Jun 9, 2014 at 11:19 PM, Matthew Jordan <mjordan at digium.com> wrote:
> On Fri, Jun 6, 2014 at 9:33 PM, Thomas McMahon <thmcmahon at gmail.com>
> wrote:
> > Hi all
> >
> > I'm excited to build a new web app using the ARI, however I'm having some
> > issues using the ari-py library with python.
> >
> > I'm trying to get up and running with the ari-py library. The REST side
> of
> > things is working great, I can create channels, do stuff to those
> channels,
> > no problems.
> >
> > However, I can't get any of the example code in the ari-py repository to
> run
> > because the websocket aspect doesn't work for me.
> >
> > When I run a 'client.run(apps='hello')' (hello being the name of the app
> in
> > the dialplan, all I get back is 'No JSON object could be decoded'. Have
> you
> > seen this error before, is there something I'm doing wrong? To me it
> seems
> > like it's hanging because it's not receiving any messages, but my
> > understanding is that this is a function that waits until it has
> received a
> > message before it does anything.
>
> Using requests 2.0.1 and websocket-client 0.12.0 with swaggerpy 0.2.0,
> I don't have that problem.
>
> However, when upgrading to requests 2.3.0 and websocket-client 0.15.0,
> I run into that same issue.
>
> Until someone can figure out what the heck changed, you may want to
> downgrade those two libraries to the versions mentioned above.
>
> > When I just use the python websocket-client library, I can connect to the
> > websocket of ari just fine. It just doesn't work with the library.
> >
>
>
> --
> Matthew Jordan
> Digium, Inc. | Engineering Manager
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at: http://digium.com & http://asterisk.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140610/edd1489e/attachment.html>
More information about the asterisk-dev
mailing list