TR: HTTP 500 error since HG 1.9/1.9.1 - was fine previously (until HG 1.8.4)

Lionel ecrire.a.lionel at gmail.com
Thu Aug 18 09:04:21 UTC 2011


Sorry - forgot to cc the mailing list (is my mind still in holidays?....)

-----Message d'origine-----
De : Lionel [mailto:ecrire.a.lionel at gmail.com] 
Envoyé : jeudi 18 août 2011 10:12
À : 'Mads Kiilerich'
Objet : RE: HTTP 500 error since HG 1.9/1.9.1 - was fine previously (until
HG 1.8.4)
Importance : Faible

Hi Mads,

I use pywin32 as isapi_wsgi requires it.

The reason why I use the pure version rather than the already
precompiled-ones is that with the latter, hgwebdir_wsgi.py always crashes
because it cannot find msvcrt90. I retried just to be sure with HG 1.9.1
(mercurial-1.9.1.win-amd64-py2.6.exe) on python 2.6, and that's still the
same old error that I had solved using the pure version:

Internal Extension Error: Failed to import callback module 'hgwebdir_wsgi'
Last Windows error: The specified module cannot be found.
Traceback (most recent call last):
  File "E:\Intranet\hg\hgwebdir_wsgi.py", line 73, in <module>
    application = hgwebdir(hgweb_config)
  File "C:\Program
Files\Python26\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", line 61,
in __init__
    self.refresh()
  File "C:\Program
Files\Python26\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", line 70,
in refresh
    u = ui.ui()
  File "C:\Program Files\Python26\lib\site-packages\mercurial\ui.py", line
35, in __init__
    for f in util.rcpath():
  File "C:\Program
Files\Python26\lib\site-packages\mercurial\demandimport.py", line 75, in
__getattribute__
    self._load()
  File "C:\Program
Files\Python26\lib\site-packages\mercurial\demandimport.py", line 47, in
_load
    mod = _origimport(head, globals, locals)
  File "C:\Program Files\Python26\lib\site-packages\mercurial\util.py", line
576, in <module>
    from windows import *
  File "C:\Program
Files\Python26\lib\site-packages\mercurial\demandimport.py", line 85, in
_demandimport
    return _origimport(name, globals, locals, fromlist)
  File "C:\Program Files\Python26\lib\site-packages\mercurial\windows.py",
line 21, in <module>
    posixfile.__doc__ = osutil.posixfile.__doc__
  File "C:\Program
Files\Python26\lib\site-packages\mercurial\demandimport.py", line 75, in
__getattribute__
    self._load()
  File "C:\Program
Files\Python26\lib\site-packages\mercurial\demandimport.py", line 47, in
_load
    mod = _origimport(head, globals, locals)
ImportError: DLL load failed: The specified module cannot be found.

-----Message d'origine-----
De : Mads Kiilerich [mailto:mads at kiilerich.com] 
Envoyé : jeudi 18 août 2011 01:16
À : Lionel
Cc : mercurial at selenic.com
Objet : Re: HTTP 500 error since HG 1.9/1.9.1 - was fine previously (until
HG 1.8.4)

Lionel wrote, On 08/17/2011 06:20 PM:
>
> Hello all,
>
> I’ve been happily running HG (yes, HG definitively rocks!!) on IIS via 
> isapi_wsgi until HG version 1.8.4. Yet, since v1.9, I get a http 500 
> error when connecting to the server. Can anybody help me? I wonder 
> what has changed and what may be breaking between 1.8.x and 1.9.x.
>
> Many thanks in advance! (please note I’ve nearly no knowledge in Python)
>
> Lionel
>
> My config:
>
> - Win 2008R2 (so 64bit)
>
> - IIS7 with IS 6.0 Management Compatibility for IIS7
>
> - python2.7.1 64 bit (coming from pywin32-216.win-amd64-py2.7.exe). 
> Python’s dir is in windows’ PATH.
>
> - pywin32 (coming from pywin32-216.win-amd64-py2.7.exe).
>

That one is no longer used in 1.9.

> - isap_wsgi (built from isapi_wsgi-0.4.2.zip)
>
> - HG – built and installed from source package using:
>
> python setup.py --pure build_py -c -d . build_ext -i build_mo
>
> python setup.py --pure install –force
>

Pure is much less tested and much slower than using compiled modules.

It would perhaps be better to use one of the Mercurial installers for 
py2.6 from http://mercurial.selenic.com/wiki/Download - and thus use 
Python 2.6 instead of 2.7.

(pmezard has however found some issues with dll versions or something 
and has made alternative installers. I can't find a link and don't know 
if the issue has been resolved.)

> The Python trace:
>
> # This window will display output from any programs that import 
> win32traceutil
>
> # win32com servers registered with '--debug' are in this category.
>
> Internal Extension Error: Failed to import callback module 'hgwebdir_wsgi'
>
> Last Windows error: The specified module cannot be found (message 
> translated).
>
> Traceback (most recent call last):
>
> File "E:\Intranet\hg\hgwebdir_wsgi.py", line 73, in <module>
>
> application = hgwebdir(hgweb_config)
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", 
> line 62, in __init__
>
> self.refresh()
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", 
> line 71, in refresh
>
> u = ui.ui()
>
> File "C:\Program Files\Python27\lib\site-packages\mercurial\ui.py", 
> line 43, in __init__
>
> for f in scmutil.rcpath():
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\demandimport.py", line 75, 
> in __getattribute__
>
> self._load()
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\demandimport.py", line 47, 
> in _load
>
> mod = _origimport(head, globals, locals)
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\scmutil.py", line 164, in 
> <module>
>
> class opener(abstractopener):
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\scmutil.py", line 180, in 
> opener
>
> @util.propertycache
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\demandimport.py", line 75, 
> in __getattribute__
>
> self._load()
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\demandimport.py", line 47, 
> in _load
>
> mod = _origimport(head, globals, locals)
>
> File "C:\Program Files\Python27\lib\site-packages\mercurial\util.py", 
> line 503, in <module>
>
> from windows import *
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\demandimport.py", line 85, 
> in _demandimport
>
> return _origimport(name, globals, locals, fromlist)
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\windows.py", line 21, in 
> <module>
>
> posixfile.__doc__ = osutil.posixfile.__doc__
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\demandimport.py", line 75, 
> in __getattribute__
>
> self._load()
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\demandimport.py", line 47, 
> in _load
>
> mod = _origimport(head, globals, locals)
>
> File "C:\Program 
> Files\Python27\lib\site-packages\mercurial\osutil.py", line 78, in 
> <module>
>
> _crt = ctypes.PyDLL(_crtname())
>
> File "C:\Program Files\Python27\Lib\ctypes\__init__.py", line 353, in 
> __init__
>
> self._handle = _dlopen(self._name, mode)
>
> WindowsError: [Error 126] The specified module cannot be found 
> (message translated)
>

That seems to be because Python can't find MSVCR90.dll, and it seems to 
be specific for using pure.

/Mads




More information about the Mercurial mailing list