Howdy all,

I decided to update from 1.6 to 2.0 and have encountered the following
odd error below when attempting to access the new Django web interface
at cobbler_web. I've looked back through the mailing list but have not
quite figured out what the deal is.  (The error I'm getting is posted in
full at the end.)

I've updated /etc/cobbler/settings.rpmnew to /etc/cobbler/settings
and /etc/cobbler/modules.conf.rpmnew to /etc/cobbler/modules

The file /usr/share/cobbler/web/settings.py exists and is has
permissions of the web server, etc.

Restarting httpd and cobbler look fine:
[r...@cobbler conf.d]# /etc/init.d/cobblerd restart
Stopping cobbler daemon:                                   [  OK  ]
Starting cobbler daemon: SERVING!
                                                           [  OK  ]

The Apache config file for the web ui looks okay:

[r...@cobbler]# cat /etc/httpd/conf.d/cobbler_web.conf
# This configuration file enables the cobbler web
# interface (django version)

<VirtualHost *:80>

# Do not log the requests generated from the event notification system
SetEnvIf Request_URI ".*/op/events/user/.*" dontlog
# Log only what remains
CustomLog logs/access_log combined env=!dontlog

<Location "/cobbler_web">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE settings
    # PythonOption django.root /cobbler_web
    PythonDebug On
    PythonPath "['/usr/share/cobbler/web/'] + sys.path"
    AuthBasicAuthoritative Off
    AuthType basic
    AuthName "Cobbler"
    Require valid-user
    PythonAuthenHandler cobbler_web.views
</Location>


</VirtualHost>


Any hints?

Thanks,
Pete Eby

* * *

Mod_python error: "PythonAuthenHandler cobbler_web.views"

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
287, in HandlerDispatch
    log=debug)

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
464, in import_module
    module = imp.load_module(mname, f, p, d)

  File "/usr/share/cobbler/web/cobbler_web/views.py", line 1, in ?
    from django.template.loader import get_template

  File "/usr/lib/python2.4/site-packages/django/template/__init__.py",
line 918, in ?
    add_to_builtins('django.template.defaultfilters')

  File "/usr/lib/python2.4/site-packages/django/template/__init__.py",
line 915, in add_to_builtins
    builtins.append(get_library(module_name))

  File "/usr/lib/python2.4/site-packages/django/template/__init__.py",
line 904, in get_library
    mod = __import__(module_name, {}, {}, [''])

  File
"/usr/lib/python2.4/site-packages/django/template/defaultfilters.py",
line 5, in ?
    from django.utils.translation import gettext

  File
"/usr/lib/python2.4/site-packages/django/utils/translation/__init__.py",
line 3, in ?
    if settings.USE_I18N:

  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line
28, in __getattr__
    self._import_settings()

  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line
55, in _import_settings
    self._target = Settings(settings_module)

  File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line
83, in __init__
    raise EnvironmentError, "Could not import settings '%s' (Is it on
sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)

EnvironmentError: Could not import settings
'/usr/share/cobbler/web/settings.py' (Is it on sys.path? Does it have
syntax errors?): No module named /usr/share/cobbler/web/settings.py
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to