Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Mercurial CGI(hgweb.CGI)失败_Python_Mercurial_Windows Server 2008 - Fatal编程技术网

Python Mercurial CGI(hgweb.CGI)失败

Python Mercurial CGI(hgweb.CGI)失败,python,mercurial,windows-server-2008,Python,Mercurial,Windows Server 2008,我在虚拟机上运行的Win 2k8 R2上安装了Mercurial 1.8.1和Python 2.6.6。我尝试过从msi、source和使用tortisehg进行安装。命令行Hg工作正常,但在运行hgweb.cgi时,我遇到了相同的错误: Traceback (most recent call last): File ".\hgweb.cgi", line 17, in application = hgweb(config) File "mercurial\hgweb\__in

我在虚拟机上运行的Win 2k8 R2上安装了Mercurial 1.8.1和Python 2.6.6。我尝试过从msi、source和使用tortisehg进行安装。命令行Hg工作正常,但在运行hgweb.cgi时,我遇到了相同的错误:

Traceback (most recent call last): File ".\hgweb.cgi", line 17, in application = hgweb(config) File "mercurial\hgweb\__init__.pyc", line 26, in hgweb File "mercurial\hgweb\hgwebdir_mod.pyc", line 61, in __init__ File "mercurial\hgweb\hgwebdir_mod.pyc", line 70, in refresh File "mercurial\ui.pyc", line 35, in __init__ File "mercurial\demandimport.pyc", line 75, in __getattribute__ File "mercurial\demandimport.pyc", line 47, in _load File "mercurial\util.pyc", line 576, in File "mercurial\demandimport.pyc", line 85, in _demandimport File "mercurial\windows.pyc", line 21, in File "mercurial\demandimport.pyc", line 75, in __getattribute__ File "mercurial\demandimport.pyc", line 47, in _load File "mercurial\osutil.pyc", line 12, in File "mercurial\osutil.pyc", line 10, in __load ImportError: DLL load failed: The specified module could not be found. 回溯(最近一次呼叫最后一次): 文件“\hgweb.cgi”,第17行,在 应用程序=hgweb(配置) 文件“mercurial\hgweb\\ uuuuu init\ uuuuu.pyc”,第26行,在hgweb中 文件“mercurial\hgweb\hgwebdir_mod.pyc”,第61行,在uu init中__ 文件“mercurial\hgweb\hgwebdir_mod.pyc”,第70行,刷新 文件“mercurial\ui.pyc”,第35行,在__ 文件“mercurial\demandimport.pyc”,第75行,在__ 文件“mercurial\demandimport.pyc”,第47行,装入 文件“mercurial\util.pyc”,第576行,在 文件“mercurial\demandimport.pyc”,第85行,在_demandimport中 文件“mercurial\windows.pyc”,第21行,在 文件“mercurial\demandimport.pyc”,第75行,在__ 文件“mercurial\demandimport.pyc”,第47行,装入 文件“mercurial\osutil.pyc”,第12行,在 文件“mercurial\osutil.pyc”,第10行,装入 ImportError:DLL加载失败:找不到指定的模块。 我在SO和其他地方找到的其他答案指出,我尝试从源代码安装,将纯osutil放到安装中,或者安装一个旧版本。我都试过了

这尤其令人沮丧,因为我有其他类似的非vm机器运行良好,但无法找到断开的连接


想法?

每当我收到的错误消息不是描述性的,而是告诉我在系统级别发生了什么,而不是发生了什么,我都会告诉我注册表和文件系统发生了什么。这是冗长的,让过滤器只显示感兴趣的过程需要一些学习,但您可以将结果导出到Excel并浏览可疑的结果。当然,要特别注意失败


尝试一下,看看正在搜索什么DLL。

使用以下系统配置时,我遇到了相同的错误

  • Python-2.6.6作为msi安装
  • mercurial-1.8.2-x86作为msi安装
  • IIS7
我简单地解决了这个问题:

  • Python很早就安装好了
  • 卸载Mercurial msi包
  • 下载并安装“Mercurial-1.8.2(32位py2.6)”安装程序,其中标记为“这是hgweb设置的建议”
  • 将C:\Python26\Lib\site packages\mercurial\的内容复制到IIS7网站设置中使用的目录中

  • 到目前为止,一切都在运转。希望这会有所帮助。

    我也有同样的问题,你找到解决办法了吗?我花了很多时间,试图让它工作…确认!msi包为我提供了相当一致的复制,具有相同的堆栈跟踪。通过切换到Mercurial Python安装程序,它现在可以像一个魅力一样工作:)我很高兴我的解决方案仍然能帮助人们。对我来说也是如此:步骤1)安装Python 2.7.4(64位)步骤2)安装Mercurial-2.6.win-amd64-py2.7.exe测试:Python hgweb.cgi