不确定是什么问题。通过ssh工作正常。在浏览器中查看时,我收到服务器错误。这是已知迁移到另一个服务器/环境的工作代码。
找不到目录中明确的模块。检查了文件的权限,看起来没问题755。
内部服务器错误
服务器遇到内部错误或配置错误,无法完成您的请求。 请与服务器管理员联系,以告知错误发生的时间以及可能导致错误的任何操作。
服务器错误日志中可能提供了有关此错误的更多信息。
ImportError: No module named xmlproducts
mod_python (pid=16232, interpreter='realtechy.com', phase='PythonHandler', handler='mod_python.cgihandler'): Application error
ServerName: 'realtechy.com'
DocumentRoot: '/var/www/vhosts/realtechy.com/httpdocs'
URI: '/products/myproducts.py'
Location: None
Directory: '/var/www/vhosts/realtechy.com/httpdocs/'
Filename: '/var/www/vhosts/realtechy.com/httpdocs/products/myproducts.py'
PathInfo: ''
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1229, in _process_target\n result = _execute_target(config, req, object, arg)
File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1128, in _execute_target\n result = object(arg)
File "/usr/lib/python2.6/site-packages/mod_python/cgihandler.py", line 96, in handler\n imp.load_module(module_name, fd, path, desc)
File "/var/www/vhosts/realtechy.com/httpdocs/products/myproducts.py", line 6, in <module>\n import xmlproducts
ImportError: No module named xmlproducts
答案 0 :(得分:0)
听起来模块安装不正确(或根本没有)。要进行验证,请执行以下操作:
python
help('modules')
xmlproducts