当我单击项目的部署按钮时,它会给我以下错误:文件" c: python27 lib lib httplib.py",第721行,in _set_hostport提高InvalidUrl("非数字端口:'%s'"%主机[i 1:])httplib.invalidurl:非数字端口:'port'。
我以前已经成功部署了该项目,因此我尝试恢复文件,以便在正常工作时拥有相同的文件。似乎没有骰子。不过,那只是黑暗中的戳刺 - 完整的痕迹显示了这一点从Google App Engine的文件开始,而不是我的。
有人知道我如何部署我的项目?
Traceback (most recent call last):
File "C:Program Files (x86)Googlegoogle_appengineappcfg.py", line 171, in <module>
run_file(__file__, globals())
File "C:Program Files (x86)Googlegoogle_appengineappcfg.py", line 167, in run_file
execfile(script_path, globals_)
File "C:Program Files (x86)Googlegoogle_appenginegoogleappenginetoolsappcfg.py", line 4191, in <module>
main(sys.argv)
File "C:Program Files (x86)Googlegoogle_appenginegoogleappenginetoolsappcfg.py", line 4182, in main
result = AppCfgApp(argv).Run()
File "C:Program Files (x86)Googlegoogle_appenginegoogleappenginetoolsappcfg.py", line 2579, in Run
self.action(self)
File "C:Program Files (x86)Googlegoogle_appenginegoogleappenginetoolsappcfg.py", line 3927, in __call__
return method()
File "C:Program Files (x86)Googlegoogle_appenginegoogleappenginetoolsappcfg.py", line 3040, in Update
updatecheck.CheckForUpdates()
File "C:Program Files (x86)Googlegoogle_appenginegoogleappenginetoolsappcfg.py", line 596, in CheckForUpdates
runtime=self.config.runtime)
File "C:Program Files (x86)Googlegoogle_appenginegoogleappenginetoolsappengine_rpc.py", line 383, in Send
f = self.opener.open(req)
File "C:Python27liburllib2.py", line 400, in open
response = self._open(req, data)
File "C:Python27liburllib2.py", line 418, in _open
'_open', req)
File "C:Python27liburllib2.py", line 378, in _call_chain
result = func(*args)
File "C:Python27liburllib2.py", line 1215, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "C:Program Files (x86)Googlegoogle_appenginelibfancy_urllibfancy_urllib__init__.py", line 370, in do_open
req)
File "C:Python27liburllib2.py", line 1146, in do_open
h = http_class(host, timeout=req.timeout) # will parse host:port
File "C:Program Files (x86)Googlegoogle_appenginelibfancy_urllibfancy_urllib__init__.py", line 78, in __init__
httplib.HTTPSConnection.__init__(self, *args, **kwargs)
File "C:Python27libhttplib.py", line 1149, in __init__
source_address)
File "C:Python27libhttplib.py", line 693, in __init__
self._set_hostport(host, port)
File "C:Python27libhttplib.py", line 721, in _set_hostport
raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: 'port'
2012-10-22 16:55:29 (Process exited with code 1)
You can close this window now.
我会说我不熟悉GUI,所以请完全无视:)。
错误似乎表明您正在尝试指定一个特定的部署端口,此外,该设置的值是"端口"一词。当将Commnand行与Dev Server一起使用时,port
是可以用来指定要使用的特定端口的参数。我最好的猜测是,当您尝试部署时,此关键字参数仍然定义(为port
)。是否有可以指定命令行标志的部分?部署时是否可以在此处定义port
?
我通过完全卸载和重新安装Python 2.7和GAE解决了这一问题。此完整的擦除应包括自GAE使用以来已设置的任何环境变量的删除。
就我而言,我认为这尤其是创建代理变量的环境。python和gae的完整擦除解决了这个问题。