Freeswitch mod_python 没有名为 freeswitch 的模块
Freeswitch mod_python No module named freeswitch
我在 Debian 8 中安装了 Freeswitch 1.6,使用 this link。正在安装最新版本的分支部分。
模块 python 已使用 fs_cli:
启用
>module_exists mod_python
true
症状
当我执行我的 Python 脚本时,我得到:
2016-08-05 05:49:23.875318 [ERR] mod_python.c:231 Error importing module
2016-08-05 05:49:23.875318 [ERR] mod_python.c:164 Python Error by calling script "fax": <type 'exceptions.ImportError'>
Message: No module named freeswitch
Exception: None
Traceback (most recent call last)
File: "/usr/share/freeswitch/scripts/fax.py", line 1, in <module>
使用 this 文档:
疑难解答:
同一个脚本正在与其他 Freeswitch 盒一起使用。
正确移动文件:
ls -al /usr/local/lib/python2.7/site-packages/
freeswitch.py
脚本fax.py内容为here
重启 Freeswitch
脚本freeswitch.py位置
- /usr/local/lib/python3.4/dist-packages/freeswitch.py
- /usr/local/lib/python2.7/site-packages/freeswitch.py
- /usr/share/pyshared/freeswitch.py
我复制了freeswitch.py
到/usr/share/freeswitch/scripts/
这解决了问题。
我在 Debian 8 中安装了 Freeswitch 1.6,使用 this link。正在安装最新版本的分支部分。
模块 python 已使用 fs_cli:
启用>module_exists mod_python
true
症状
当我执行我的 Python 脚本时,我得到:
2016-08-05 05:49:23.875318 [ERR] mod_python.c:231 Error importing module
2016-08-05 05:49:23.875318 [ERR] mod_python.c:164 Python Error by calling script "fax": <type 'exceptions.ImportError'>
Message: No module named freeswitch
Exception: None
Traceback (most recent call last)
File: "/usr/share/freeswitch/scripts/fax.py", line 1, in <module>
使用 this 文档:
疑难解答:
同一个脚本正在与其他 Freeswitch 盒一起使用。
正确移动文件:
ls -al /usr/local/lib/python2.7/site-packages/ freeswitch.py
脚本fax.py内容为here
重启 Freeswitch
脚本freeswitch.py位置
- /usr/local/lib/python3.4/dist-packages/freeswitch.py
- /usr/local/lib/python2.7/site-packages/freeswitch.py
- /usr/share/pyshared/freeswitch.py
我复制了freeswitch.py
到/usr/share/freeswitch/scripts/
这解决了问题。