专栏首页python3cobbler MOD_PYTHON E

cobbler MOD_PYTHON E

 今天在做cobbler的时候所有都做好了,但就是访问不了,报下边这样一个错误:

MOD_PYTHON ERROR  
  
ProcessId:      370  
Interpreter:    '127.0.0.1'  
  
ServerName:     '127.0.0.1'  
DocumentRoot:   '/var/www/html'  
  
URI:            '/cobbler_web/'  
Location:       '/cobbler_web'  
Directory:      None  
Filename:       '/var/www/cobbler_web'  
PathInfo:       '/'  
  
Phase:          'PythonHandler'  
Handler:        'django.core.handlers.modpython'  
  
Traceback (most recent call last):  
  
  File "/usr/lib64/python2.4/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch  
    default=default_handler, arg=req, silent=hlist.silent)  
  
  File "/usr/lib64/python2.4/site-packages/mod_python/importer.py", line 1229, in _process_target  
    result = _execute_target(config, req, object, arg)  
  
  File "/usr/lib64/python2.4/site-packages/mod_python/importer.py", line 1128, in _execute_target  
    result = object(arg)  
  
  File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 212, in handler  
    return ModPythonHandler()(req)  
  
  File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 174, in __call__  
    self.load_middleware()  
  
  File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 39, in load_middleware  
    for middleware_path in settings.MIDDLEWARE_CLASSES:  
  
  File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 276, in __getattr__  
    self._setup()  
  
  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line 42, in _setup  
    self._wrapped = Settings(settings_module)  
  
  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line 125, in __init__  
    raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)  
  
ValueError: Incorrect timezone setting: America/NewYork  

    这个问题是因为cobbler的web程序在调用时区的时候找不到这样一个模块,去查看/usr/share/cobbler/web/setting.py这个文件的发现有这么一行:TIME_ZONE = 'America/NewYork',说明python调用的模块是时区中America目录下的NewYork文件,但是在/usr/share/zoneinfo/这个时区的文件夹下边的America目录只能发现New_York这个文件,没有NewYork文件,所以会报出来模块错误。

解决办法:

cd /usr/share/zoneinfo/America    cp New_York NewYork  

重新访问就可以了

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • /root/.python-eggs 报

    Traceback (most recent call last):   File "/home/himalayas/fdsearch/fdsearch/bin...

    py3study
  • python错误:distutils.e

    [root@host73 python]# python setup.py install

    py3study
  • 解决树莓派下载django的TypeE

    进日, 玩起了树莓派3B+, 对我这种新手来说, 不搭服务器怎么可以, So, 选择Python的Django库, 尝试各种方法, 失败N次 报错为:

    py3study
  • python错误:distutils.e

    [root@host73 python]# python setup.py install

    py3study
  • cobbler相关报错

    原因是因为cobbler的客户端内存给小了,所以提示没有可用的空间,然后把客户端内存给大一点即可

    张琳兮
  • OSError: [Errno 2] No such file or directory

    ['mkdir -p /tmp/gluster_volume_files.can.not.delete']

    党志强
  • Python3运行时查看线程信息

    kongxx
  • Python之Dijango的“坑” hostname, aliases, ipaddrs = gethostbyaddr(name) UnicodeDecodeError: 'utf-8' cod

    错误代码提示: hostname, aliases, ipaddrs = gethostbyaddr(name) UnicodeDecodeError: 'ut...

    用户1214487
  • uwsgi日志中文问题

    开发项目,使用uwsgi,遇到个头痛的问题,如果指定了uwsgi打印日志,当日志中写入中文时,直接会导致报错

    fanspring
  • Sublime text无法自动通过package control安装插件的研究

    版权声明:署名,允许他人基于本文进行创作,且必须基于与原先许可协议相同的许可协议分发本文 (Creative Commons)

    Jerry Wang

扫码关注云+社区

领取腾讯云代金券