<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>voicemail Error importing module</title>
		<link>http://wikipbx.subwiki.com/forum/t-142260/voicemail-error-importing-module</link>
		<description>Posts in the discussion thread &quot;voicemail Error importing module&quot; - When a call goes into voicemail an error occurs. Importerror: No module named django.db</description>
				<copyright></copyright>
		<lastBuildDate>Mon, 06 Feb 2012 00:45:31 +0000</lastBuildDate>
		
					<item>
				<guid>http://wikipbx.subwiki.com/forum/t-142260#post-434048</guid>
				<title>Re: voicemail Error importing module</title>
				<link>http://wikipbx.subwiki.com/forum/t-142260/voicemail-error-importing-module#post-434048</link>
				<description></description>
				<pubDate>Mon, 30 Mar 2009 13:50:23 +0000</pubDate>
				<wikidot:authorName>stas_shtin</wikidot:authorName>				<wikidot:authorUserId>230176</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Interesting, I've just checked and looks like python is detected correctly even if it's disabled in modules.conf. So my guess was wrong, although I've experienced such problem some time ago. Can you confirm that running "python -V" doesn't show that you have python 2.4 as default?</p> <p>Apparently, it should be possible to avoid such error by forcing FS to use an exact version of python by specifying —with-python=/path/to/python/executable flag to configure script.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://wikipbx.subwiki.com/forum/t-142260#post-434014</guid>
				<title>Re: voicemail Error importing module</title>
				<link>http://wikipbx.subwiki.com/forum/t-142260/voicemail-error-importing-module#post-434014</link>
				<description></description>
				<pubDate>Mon, 30 Mar 2009 13:21:00 +0000</pubDate>
				<wikidot:authorName>tjaracas</wikidot:authorName>				<wikidot:authorUserId>302813</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I think the sequence of events is correct in the manual. My only guess is that is looked for a previously installed 2.4 python version on the system in stead of the newer 2.6 version. I dont think that the sequence of events in the manual is wrong. If you add an additional module to freeswitch you just can make it in the source dir and adding it to modules.conf.xml. No deed to reconfigure the complete application. So somewhere it took the incorrect version for python and put this in the makefile.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://wikipbx.subwiki.com/forum/t-142260#post-433966</guid>
				<title>Re: voicemail Error importing module</title>
				<link>http://wikipbx.subwiki.com/forum/t-142260/voicemail-error-importing-module#post-433966</link>
				<description></description>
				<pubDate>Mon, 30 Mar 2009 12:29:35 +0000</pubDate>
				<wikidot:authorName>stas_shtin</wikidot:authorName>				<wikidot:authorUserId>230176</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I've had this issue before. I think that the problem is caused by invalid sequence of actions in wikipbx install manual: it tells you first to bootstrap &amp; configure freeswitch and later to edit modules.conf. But that means that the modules.conf has default values when configure script is run, so when you build freeswitch with mod_python enabled it uses default values instead of the ones it can detect on your system.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://wikipbx.subwiki.com/forum/t-142260#post-433926</guid>
				<title>Re: voicemail Error importing module</title>
				<link>http://wikipbx.subwiki.com/forum/t-142260/voicemail-error-importing-module#post-433926</link>
				<description></description>
				<pubDate>Mon, 30 Mar 2009 11:45:26 +0000</pubDate>
				<wikidot:authorName>tjaracas</wikidot:authorName>				<wikidot:authorUserId>302813</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Pyton version Python 2.6.1 (r261:67515, Mar 23&nbsp;2009, 14:19:54)<br /> [GCC 4.1.2&nbsp;20071124 (Red Hat 4.1.2-42)] on linux2<br /> Type "help", "copyright", "credits" or "license" for more information.</p> <p>output after running from django-db import models<br /> from django.db import models<br /> Traceback (most recent call last):<br /> File "&lt;stdin&gt;", line 1, in &lt;module&gt;<br /> File "/usr/local/lib/python2.6/site-packages/django/db/<span style="text-decoration: underline;">init</span>.py", line 7, in &lt;module&gt;<br /> if not settings.DATABASE_ENGINE:<br /> File "/usr/local/lib/python2.6/site-packages/django/conf/<span style="text-decoration: underline;">init</span>.py", line 28, in <span style="text-decoration: underline;">getattr</span><br /> self._import_settings()<br /> File "/usr/local/lib/python2.6/site-packages/django/conf/<span style="text-decoration: underline;">init</span>.py", line 53, in _import_settings<br /> raise EnvironmentError, "Environment variable %s is undefined." % ENVIRONMENT_VARIABLE<br /> EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined.</p> <p>Here is the output of themakefile</p> <ol> <li>define these targets in your makefile if you wish</li> <li>local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:</li> </ol> <ol> <li>and define these variables to impact your build</li> </ol> <p>LOCAL_CFLAGS = -I/usr/include/python2.4 -I/usr/include/python2.4 -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector —param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC<br /> LOCAL_LDFLAGS= -lpthread -ldl -lutil -lm -lpython2.4<br /> LOCAL_OBJS=freeswitch_python.o mod_python_wrap.o<br /> include ../../../../build/modmake.rules</p> <p>LINK=$(CXXLINK)</p> <p>PYMOD=freeswitch<br /> PYTHON_SITE_DIR=/usr/lib/python2.4/site-packages</p> <p>SWIGCFILE=../../../switch_swig.c<br /> SWIGIFILE=../../../switch_swig.i</p> <p>reswig: swigclean mod_python_wrap.cpp</p> <p>swigclean: clean<br /> rm -f mod_python_wrap.* freeswitch.py</p> <p>mod_python_wrap.cpp: mod_python_extra.c<br /> swig -python -c++ -I../../../../src/include -oh mod_python_wrap.h -o mod_python_wrap.cpp mod_python.i<br /> echo "#include \"mod_python_extra.c\"" » mod_python_wrap.cpp<br /> patch -s -p0 -i hack.diff</p> <p>local_install:<br /> mkdir -m755 -p $(DESTDIR)$(PYTHON_SITE_DIR)<br /> cp -f freeswitch.py $(DESTDIR)$(PYTHON_SITE_DIR)</p> <p>I already see where it is going wrong.</p> <p>I can either change the 2.4 value in the makefile or add the /correct path to site-packages in my PYTHONPATH. I did last and all is working fine now. Thanks.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://wikipbx.subwiki.com/forum/t-142260#post-432763</guid>
				<title>Re: voicemail Error importing module</title>
				<link>http://wikipbx.subwiki.com/forum/t-142260/voicemail-error-importing-module#post-432763</link>
				<description></description>
				<pubDate>Sun, 29 Mar 2009 04:36:26 +0000</pubDate>
				<wikidot:authorName>tleyden</wikidot:authorName>				<wikidot:authorUserId>230690</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>What seems to be happening is that the IVR executing under freeswitch cannot find the django library python code. This could happen if Django was not installed correctly (or not at all), or if Django was installed to a different version of python than the one freeswitch is using.</p> <p>Please do the following:</p> <p>1. Run "python" from the command line and post the python version</p> <p>2. Enter</p> <div class="code"> <pre> <code>from django.db import models</code> </pre></div> <p>on the python shell and post the output</p> <p>3. Copy and paste the /usr/src/freeswitch_xxx/src/mod/languages/mod_python/Makefile file to your post</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://wikipbx.subwiki.com/forum/t-142260#post-432293</guid>
				<title>Re: voicemail Error importing module</title>
				<link>http://wikipbx.subwiki.com/forum/t-142260/voicemail-error-importing-module#post-432293</link>
				<description></description>
				<pubDate>Sat, 28 Mar 2009 15:10:50 +0000</pubDate>
				<wikidot:authorName>stas_shtin</wikidot:authorName>				<wikidot:authorUserId>230176</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So, do you have Django installed as described in the <a href="http://wikipbx.subwiki.com/installation-manual#toc27">installation manual</a>?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://wikipbx.subwiki.com/forum/t-142260#post-431622</guid>
				<title>voicemail Error importing module</title>
				<link>http://wikipbx.subwiki.com/forum/t-142260/voicemail-error-importing-module#post-431622</link>
				<description></description>
				<pubDate>Fri, 27 Mar 2009 18:58:34 +0000</pubDate>
				<wikidot:authorName>tjaracas</wikidot:authorName>				<wikidot:authorUserId>302813</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hello, After a call is going into voicemail using the standard xml template i receive the following error in freeswitch and wikipbx log. The export python settings are in place. PLeae advice if you have an idea what might be causing this situation.</p> <p>My dialplan looks like this<br /> &lt;action application="set" data="call_timeout=30"/&gt;<br /> &lt;action application="set" data="continue_on_fail=true"/&gt;<br /> &lt;action application="set" data="hangup_after_bridge=true"/&gt;<br /> &lt;action application="bridge" data="sofia/arubel/7050%ipaddress"/&gt;<br /> &lt;action application="set" data="vmaction=record"/&gt;<br /> &lt;action application="python" data="wikipbx.ivr.voicemail"/&gt;</p> <p>the freeswitchlog shows this</p> <p>2009-03-27&nbsp;14:58:31 [NOTICE] mod_python.c:107 eval_some_python() Invoking py module: wikipbx.ivr.voicemail<br /> 2009-03-27&nbsp;14:58:32 [ERR] mod_python.c:121 eval_some_python() Error importing module<br /> Traceback (most recent call last):<br /> File "/usr/src/wikipbx/ivr/voicemail.py", line 11, in ?<br /> from wikipbx.wikipbxweb.models import *<br /> File "/usr/src/wikipbx/wikipbxweb/models.py", line 27, in ?<br /> from django.db import models<br /> ImportError: No module named django.db<br /> 2009-03-27&nbsp;14:58:32 [NOTICE] switch_core_state_machine.c:172 switch_core_standard_on_execute() Hangup sofia/arubel/<span class="wiki-email">01.411.57.091|1507#01.411.57.091|1507</span> [CS_EXECUTE] [NORMAL_CLEARING]</p> <p>and the wikipbx does this</p> <p>2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] |7050| != |^00(\d{10,15})$|<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] |7050| != |1234|<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] |7050| != |outgoing2endpoint-7444972|<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] |7050| == |^7050$| (MATCH!)<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] actions_dom: &lt;?xml version="1.0" ?&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;actions_xml&gt;&lt;action application="set" data="call_timeout=30"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application="set" data="continue_on_fail=true"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application="set" data="hangup_after_bridge=true"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application="bridge" data="sofia/arubel/7050%190.75.114.10"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application="set" data="vmaction=record"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application="python" data="wikipbx.ivr.voicemail"/&gt;&lt;/actions_xml&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] Going to copy elt: &lt;action application="set" data="call_timeout=30"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] Going to copy elt: &lt;action application="set" data="continue_on_fail=true"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] Going to copy elt: &lt;action application="set" data="hangup_after_bridge=true"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] Going to copy elt: &lt;action application="bridge" data="sofia/arubel/7050%190.75.114.10"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] Going to copy elt: &lt;action application="set" data="vmaction=record"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] Going to copy elt: &lt;action application="python" data="wikipbx.ivr.voicemail"/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;?xml version="1.0"?&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;document type="freeswitch/xml"&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;section name="dialplan" description="Various Dialplan"&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1]<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;context name='default'&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;extension name='dynamic_wikipbx_extension'&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;condition field='destination_number'&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application='set' data='account_id=1'/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application='set' data='extension_id=3'/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application='set' data='call_timeout=30'/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application='set' data='continue_on_fail=true'/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application='set' data='hangup_after_bridge=true'/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application='bridge' data='sofia/arubel/7050%190.75.114.10'/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application='set' data='vmaction=record'/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;action application='python' data='wikipbx.ivr.voicemail'/&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;/condition&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;/extension&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;/context&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1]<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;/section&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,533,127.0.0.1] &lt;/document&gt;<br /> 2009-03-27&nbsp;23:31:42+0000 [-] 127.0.0.1 - - [27/Mar/2009:23:31:42 -0430] "POST /xml_dialplan/ HTTP/1.1" 200&nbsp;789 "-" "freeswitch-xml/1.0"<br /> 2009-03-27&nbsp;23:31:42+0000 [HTTPChannel,534,127.0.0.1] CDR Added</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>
