HGweb / Python läuft nicht ....

NetBull

Erfahrenes Mitglied
Moin,

ich habe gestern angefangen eine neue Maschine auf zu setzen. Bei der Installation von Mercurial, hab ich ein Problemchen.

Kann jemand mit dem folgenden Fehler was anfangen? Python habe ich schon neu aufgesetzt, das wars wohl nicht.

LG NetBu||

Fehler laut /var/log/access2/error.log:
Code:
[Sat May 24 07:29:46 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.11 with Suhosin-Patch configured -- resuming normal operations
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1] Traceback (most recent call last):
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/var/hg/hgwebdir.cgi", line 19, in <module>
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     application = hgweb(config)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/__init__.py", line 26, in hgweb
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     return hgwebdir_mod.hgwebdir(config, baseui=baseui)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgwebdir_mod.py", line 89, in __init__
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     self.refresh()
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgwebdir_mod.py", line 106, in refresh
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     u.readconfig(self.conf, remap=map, trust=True)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/ui.py", line 81, in readconfig
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     cfg.read(filename, fp, sections=sections, remap=remap)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/config.py", line 149, in read
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     self.parse(path, fp.read(), sections, remap, self.read)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/config.py", line 144, in parse
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     raise error.ParseError(l.rstrip(), ("%s:%s" % (src, line)))
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1] mercurial.error.ParseError: ('collections]', '/var/hg/hgweb.config:1')
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1] Error in sys.excepthook:
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1] Traceback (most recent call last):
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in apport_excepthook
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     from apport.fileutils import likely_packaged, get_recent_crashes
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 95, in _demandimport
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     return _import(name, globals, locals, fromlist, level)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     from apport.report import Report
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 114, in _demandimport
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     mod = _origimport(name, globals, locals)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/apport/report.py", line 155, in <module>
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     class Report(problem_report.ProblemReport):
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 86, in __getattribute__
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     self._load()
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 58, in _load
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     mod = _origimport(head, globals, locals)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/problem_report.py", line 93, in <module>
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     class ProblemReport(UserDict):
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1] TypeError: Error when calling the metaclass bases
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     module.__init__() takes at most 2 arguments (3 given)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1] Original exception was:
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1] Traceback (most recent call last):
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/var/hg/hgwebdir.cgi", line 19, in <module>
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     application = hgweb(config)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/__init__.py", line 26, in hgweb
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     return hgwebdir_mod.hgwebdir(config, baseui=baseui)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgwebdir_mod.py", line 89, in __init__
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     self.refresh()
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgwebdir_mod.py", line 106, in refresh
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     u.readconfig(self.conf, remap=map, trust=True)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/ui.py", line 81, in readconfig
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     cfg.read(filename, fp, sections=sections, remap=remap)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/config.py", line 149, in read
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     self.parse(path, fp.read(), sections, remap, self.read)
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]   File "/usr/lib/python2.7/dist-packages/mercurial/config.py", line 144, in parse
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1]     raise error.ParseError(l.rstrip(), ("%s:%s" % (src, line)))
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1] mercurial.error.ParseError: ('collections]', '/var/hg/hgweb.config:1')
[Sat May 24 07:29:53 2014] [error] [client 192.168.254.1] Premature end of script headers: hgwebdir.cgi
 
Nachtrag: ein einfaches
Code:
print "Content-type: text/html\n\n";
an den Anfang der Python CGI Datei hilft das APACHE Fehler anständig parsed...
Fehler vom Apachen ist dann in der Anlage. Irgendwie kennt der die Anwendung HGWEB nicht. Die finde ich auch nirgendwo. Weis wer was ich mit apt-get installen muss, damit ich hgweb mit drin habe?

Code:
<class 'mercurial.error.ParseError'>    Python 2.7.3: /usr/bin/python
Sat May 24 14:46:02 2014

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/var/hg/hgwebdir.cgi in ()
     17
     18 from mercurial import demandimport; demandimport.enable()
     19 from mercurial.hgweb import hgweb, wsgicgi
=>   20 application = hgweb(config)
     21 wsgicgi.launch(application)
application undefined, hgweb = <function hgweb>, config = '/var/hg/hgweb.config'
/usr/lib/python2.7/dist-packages/mercurial/hgweb/__init__.py in hgweb(config='/var/hg/hgweb.config', name=None, baseui=None)
     24         isinstance(config, dict) or isinstance(config, list)):
     25         # create a multi-dir interface
=>   26         return hgwebdir_mod.hgwebdir(config, baseui=baseui)
     27     return hgweb_mod.hgweb(config, name=name, baseui=baseui)
     28
global hgwebdir_mod = <module 'mercurial.hgweb.hgwebdir_mod' from '/us.../dist-packages/mercurial/hgweb/hgwebdir_mod.pyc'>, hgwebdir_mod.hgwebdir = <class 'mercurial.hgweb.hgwebdir_mod.hgwebdir'>, config = '/var/hg/hgweb.config', baseui = None
/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgwebdir_mod.py in __init__(self=<mercurial.hgweb.hgwebdir_mod.hgwebdir object>, conf='/var/hg/hgweb.config', baseui=None)
     87         self.lastrefresh = 0
     88         self.motd = None
=>   89         self.refresh()
     90
     91     def refresh(self):
self = <mercurial.hgweb.hgwebdir_mod.hgwebdir object>, self.refresh = <bound method hgwebdir.refresh of <mercurial.hgweb.hgwebdir_mod.hgwebdir object>>

Irgendeine Idee was das sein könnte?
LG NetBu||
 
Fehler gefunden....
vor Collections fehlte ein [

usr@mosys-test:/var/hg$ vi /var/hg/hgweb.config
collections]
/var/hg/repos = /var/hg/repos
[web]
#style = monoblue
allow_archive = zip
~
 
Zurück