views:

43

answers:

1

Hello,

I am trying to deploy mercurial under Ubuntu 8.04. Mercurial packages were installed correctly, but when I've configured http interface I always get 500 error.

I enabled outputting debug info to error.log and got:

mod_wsgi (pid=21159): Exception occurred within WSGI script
'/home/hg/rep/hgwebdir.wsgi'.
Traceback (most recent call last):
File "/home/hg/rep/hgwebdir.wsgi", line 67, in <module>
wsgicgi.launch(application)
File "/var/lib/python-support/python2.5/mercurial/hgweb/wsgicgi.py", line 64, in launch
result = application(environ, start_response)
TypeError: 'hgwebdir' object is not callable

My desktop is with Ubuntu 10.04, and home server with ubuntu 9.10, and configuration is the same, and works like a charm.

I compiled python 2.6, and in hgwebdir.wsgi put path to this library -

 import sys
 sys.path.insert(0, "/path/to/python/lib")

But it doesn't work anyways.

What shall I do??

Thanks.

+1  A: 

Which version of mercurial are you using? If you're still using the 1.0.x that ubuntu ships update to the PPAs from launchpad: https://launchpad.net/~mercurial-ppa/+archive/stable-snapshots

In 1.6 hgwebdir has been renamed to just 'hgweb' which will alter your config slightly.

Also what are you using the launch the wsgi stuff? Apache?

Ry4an
I checked, the version is 0.9.5. I installed it from repositorysudo aptitude install mercurialYes, I'm trying to configure Apache with apache2-mod-wsgi.Shall reinstall mercurial from launchpad?
maectpo
0.9.5 is hideously old. Try 1.6.x from launch pad; it works great with ubuntu. I've had it working with Apache in a blink.
Ry4an
Thanks, it works!I purge existing mercurial, then get mercurial 1.6 from ppa and replace my hgweb.wsgi from /usr/share/doc/mercurial/examples/hgweb.wsgi.In this wsgi script I changed only path to my config.And it works!Thanks a lot!
maectpo
Good deal. I really wish ubuntu would hurry up and pull in from the PPA a version built in the last year, but I've no idea how that process/decision goes on their end.
Ry4an