"AttributeError: module" … "contains no 'handler'"

Probleme bei der Installation?
Antworten
zork66
User
Beiträge: 1
Registriert: Dienstag 8. November 2011, 15:22

Hi,

Eine Frage, ich versuche PySOS von OOSThetys zum Laufen zu bekommen.

Habe alle benötigten Module installiert - so weit ich das beurteilen kann.

Bekomme aber immer, wenn ich sos.py im Browser aufrufe, folgende Meldung:

Code: Alles auswählen

MOD_PYTHON ERROR

ProcessId:      10277
Interpreter:    'kfki'

ServerName:     'kfki'
DocumentRoot:   '/srv/www/htdocs'

URI:            '/PySOS/sos.py'
Location:       None
Directory:      '/srv/www/htdocs/PySOS/'
Filename:       '/srv/www/htdocs/PySOS/sos.py'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'sos'

Traceback (most recent call last):

  File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1206, in _process_target
    object = apache.resolve_object(module, object_str, arg, silent=silent)

  File "/usr/lib/python2.6/site-packages/mod_python/apache.py", line 696, in resolve_object
    raise AttributeError, s

AttributeError: module '/srv/www/htdocs/PySOS/sos.py' contains no 'handler'


MODULE CACHE DETAILS

Accessed:       Tue Nov  8 14:49:48 2011
Generation:     0

_mp_1718fa19217d211fe26e708415970685 {
  FileName:     '/srv/www/htdocs/PySOS/config.py'
  Instance:     1 [IMPORT]
  Generation:   1
  Modified:     Mon Nov  7 17:09:36 2011
  Imported:     Tue Nov  8 14:49:48 2011
}

_mp_1c44dc9b74b72428c267c0577fcfb6cd {
  FileName:     '/srv/www/htdocs/PySOS/sos.py'
  Instance:     1 [IMPORT]
  Generation:   2
  Modified:     Wed Feb 21 21:18:32 2007
  Imported:     Tue Nov  8 14:49:48 2011
  Children:     '/srv/www/htdocs/PySOS/config.py'
}
Der folgende Part steht dazu in der httpd.conf:

Code: Alles auswählen

### Konfiguration fuer pysos ################################################
<Directory /srv/www/htdocs/PySOS>
 AddHandler mod_python .py
 DirectoryIndex index.html index.py
 PythonHandler sos
 PythonDebug On
# PythonPath "./srv/www/htdocs/PySOS"
#</Directory>
#<Location /mpinfo>
#      SetHandler mod_python
#      PythonHandler mod_python.testhandler
#    </Location>
#<Directory /var/www/html/cmop/ws>
#  AddHandler mod_python .py
#  DirectoryIndex index.html index.py
#  PythonHandler mod_python.publisher
#  PythonDebug On
# </Directory>
Kann mir da wer bei helfen?

Danke Dennis.
BlackJack

@zork66: Die `AttributeError`-Zeile gibt den entscheidenden Hinweis: Im `sos`-Modul gibt es kein Objekt mit dem Namen `handler` — jedenfalls in einer der beiden Versionen nicht, die man dort herunter laden kann. Versuchs mal mit der Version 0.3.

Nur zur Information `mod_python` ist tot: The mod_python project is now officially dead.
Antworten