Issue with mod_python - exceptions.AttributeError
Gents, I’m a big fan of mod_python, as it gives a lot of liberty in handling the calls. However, I tried to tie in Celery to the mix, and I’m getting a nasty error. I’m loading the test.py script using the application python in the dialplan. I also tried an alternative to celery, Kuyruk, but that was the exact same problem. Am I trying to push mod_python over the barrier it was meant for? Or am I just doing something not as it should? Ps, I noticed in the mailinglist you want to improve the mod_python documentation! I’ld be happy to help where I can. Some excerpts of the cli and code: 2014-03-04 14:58:31.269345 [ERR] mod_python.c:231 Error importing module 2014-03-04 14:58:31.269345 [ERR] mod_python.c:164 Python Error by calling script „test": <type 'exceptions.AttributeError'> Message: 'module' object has no attribute 'argv' Exception: None Traceback (most recent call last) File: "/usr/local/freeswitch/scripts/test.py", line 1, in <module> File: "/usr/local/freeswitch/scripts/tasks.py", line 1, in <module> File: "/usr/local/lib/python2.7/dist-packages/celery/__init__.py", line 106, in <module> test.py: from tasks import add_together def fsapi(session, stream, env, args): pass tasks.py: from celery import Celery celery = Celery('tut1', broker='redis://localhost:6379',backend='redis://localhost:6379') @celery.task() def add_together(a, b): print(a + b) return(a+b) Thx! Davy
On Tue, Mar 4, 2014 at 7:19 AM, davy <davy.van.de.moere@gmail.com> wrote:
Gents,
I'm a big fan of mod_python, as it gives a lot of liberty in handling the calls
<SNIP/> Just a gentle reminder that, while the majority of the users on this list are males [gentlemen would be a stretch, haha], not everyone is. The author of the awesome, weekly reviews, Kathleen King, comes to mind. Who knows who else lurks? :) It it's good to keep that in mind and make sure everyone always feels included. Anyway, this post originally caught my eye because of the Python and Celery mentions --I'll be reading on and replying there :) Best, Gabe
participants (2)
-
davy
-
Gabriel Gunderson