Right combination of library versions?
Forum » WikiPBX / Technical Support » Right combination of library versions?
Started by: cfourcfour
On: 1245337391|%e %b %Y, %H:%M %Z|agohover
Number of posts: 7
rss icon RSS: New posts
Summary:
Can't seem to put all the pieces together to make it work...
Right combination of library versions?
cfourcfour 1245337391|%e %b %Y, %H:%M %Z|agohover

I'm really excited about the interface, but I'm having great difficulty getting it working. There seems to be some sensitivity around library versions, i.e. Django 0.9x vs. 1.0, and/or wsgi and/or …? I'm having a hard time interpreting the error messages that get spit out, to point to what library is causing the problem.

Can someone identify a working configuration, compatible with Python 2.4.3? I've tried Django 0.95.4, 0.96.3, 1.0.2, and seem to get different errors every time. Example (Django 0.96.3):

2009/06/18 11:38 -0300 [-] 127.0.0.1 - - [18/Jun/2009:14:38:16 -0300] "POST /xml_dialplan/ HTTP/1.1" 200 127 "-" "freeswitch-xml/1.0"
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] ERROR!!
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] Error generating config: 'module' object has no attribute 'blockingCallFromThread'
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] Traceback (most recent call last):
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] File "/usr/src/wikipbx/wikipbxweb/views.py", line 1843, in xml_dialplan
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] if not request.POST:
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] File "/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 136, in _get_post
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] self._load_post_and_files()
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] File "/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 116, in _load_post_and_files
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] self._post, self._files = http.QueryDict(self.raw_post_data), datastructures.MultiValueDict()
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] File "/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 165, in _get_raw_post_data
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] safe_copyfileobj(self.environ['wsgi.input'], buf, size=content_length)
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] File "/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 67, in safe_copyfileobj
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] buf = fsrc.read(min(length, size))
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] File "/usr/lib/python2.4/site-packages/twisted/web2/wsgi.py", line 74, in read
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] return threads.blockingCallFromThread(
2009/06/18 11:38 -0300 [HTTPChannel,18,127.0.0.1] AttributeError: 'module' object has no attribute 'blockingCallFromThread'

[root@agbridge1 wikipbx]# echo $PYTHONPATH
:/usr/src:/opt/freeswitch/scripts/socket

(wikipbx installed in '/usr/src/wikipbx')

Also using the latest SVN of freeswitch, 1.0.4

Reply  |  Options
Unfold Right combination of library versions? by cfourcfour, 1245337391|%e %b %Y, %H:%M %Z|agohover
Re: Right combination of library versions?
tleydentleyden 1245346096|%e %b %Y, %H:%M %Z|agohover

You are probably right that you have an incompatible library version somewhere. Here's what I am running:

  • Twisted: 25481
  • Django: 5024 (this one is mentioned in the docs)
  • Freeswitch: 13223 (but it probably works with latest trunk)

My guess is that you are running the latest version of twisted, which the install document recommends, but they refactored and moved/removed some method that the code was calling. I updated the docs to recommend twisted version 25481.

Double check your Django version .. that one is important.

The freeswitch version is probably the least likely to cause issues .. due to the decoupled design that the freeswitch people devised, wikipbx hardly ever breaks when freeswitch changes.

Reply  |  Options
Unfold Re: Right combination of library versions? by tleydentleyden, 1245346096|%e %b %Y, %H:%M %Z|agohover
Re: Right combination of library versions?
stas_shtinstas_shtin 1245350165|%e %b %Y, %H:%M %Z|agohover

Note that python 2.4 is almost 5 years old now, and changes to wikipbx probably aren't even tested against this version. You should consider using python 2.5 or 2.6 if it's possible. That said, your problems are likely caused by not installing correct django svn revision.

Reply  |  Options
Unfold Re: Right combination of library versions? by stas_shtinstas_shtin, 1245350165|%e %b %Y, %H:%M %Z|agohover
Re: Right combination of library versions?
tleydentleyden 1245350579|%e %b %Y, %H:%M %Z|agohover

I would say there is 95% chance everything will work fine with python 2.4 .. but as stas_shtin mentioned, all of the testing/usage is done with python 2.5 so it would be better to upgrade if possible. I don't think your particular error is related to the python version though.

Reply  |  Options
Unfold Re: Right combination of library versions? by tleydentleyden, 1245350579|%e %b %Y, %H:%M %Z|agohover
Re: Right combination of library versions?
cfourcfour 1245430480|%e %b %Y, %H:%M %Z|agohover

I'm running this on a RHEL5.3 host, that includes the aforementioned version of python. It looks to be a Twisted/Django problem, but I still can't put my finger on it. I came across TrixSwitch, based on CentOS, and it, too uses Python 2.4 (of, course.) The libraries sets were virtually identical.

Reply  |  Options
Unfold Re: Right combination of library versions? by cfourcfour, 1245430480|%e %b %Y, %H:%M %Z|agohover
Re: Right combination of library versions?
stas_shtinstas_shtin 1245430830|%e %b %Y, %H:%M %Z|agohover

Is there any reason why you can't install the correct versions of the libraries like the install guide tells?

Reply  |  Options
Unfold Re: Right combination of library versions? by stas_shtinstas_shtin, 1245430830|%e %b %Y, %H:%M %Z|agohover
Re: Right combination of library versions?
tleydentleyden 1245433421|%e %b %Y, %H:%M %Z|agohover

What version of django and twisted are you currently running?

  • cd /usr/src/django
  • svn info
  • paste output to forum
  • cd /usr/src/twisted
  • svn info
  • paste output to forum

Yes it is a good idea to compare to trixswitch .. the first version that had wikipbx bundled.

Reply  |  Options
Unfold Re: Right combination of library versions? by tleydentleyden, 1245433421|%e %b %Y, %H:%M %Z|agohover
New Post
page_revision: 0, last_edited: 1226259295|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License