1

When I click the Deploy button for my project, it gives me the following error: File "C:\Python27\lib\httplib.py", line 721, in _set_hostport raise InvalidURL("nonnumeric port: '%s'" % host[i+1:]) httplib.InvalidURL: nonnumeric port: 'port'.

I've successfully deployed this project before, so I tried reverting the files so that I would have the same files when it worked properly. No dice, it seems. That was just a jab in the dark, though -- the full trace shows this starting in Google App Engine's files, not mine.

Anyone know how I can deploy my project?

Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 171, in <module>
run_file(__file__, globals())
  File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 167, in run_file
execfile(script_path, globals_)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4191, in <module>
main(sys.argv)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4182, in main
result = AppCfgApp(argv).Run()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2579, in Run
self.action(self)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3927, in __call__
return method()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3040, in Update
updatecheck.CheckForUpdates()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 596, in CheckForUpdates
runtime=self.config.runtime)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 383, in Send
f = self.opener.open(req)
  File "C:\Python27\lib\urllib2.py", line 400, in open
response = self._open(req, data)
  File "C:\Python27\lib\urllib2.py", line 418, in _open
'_open', req)
  File "C:\Python27\lib\urllib2.py", line 378, in _call_chain
result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 1215, in https_open
return self.do_open(httplib.HTTPSConnection, req)
  File "C:\Program Files (x86)\Google\google_appengine\lib\fancy_urllib\fancy_urllib\__init__.py", line 370, in do_open
req)
  File "C:\Python27\lib\urllib2.py", line 1146, in do_open
h = http_class(host, timeout=req.timeout) # will parse host:port
  File "C:\Program Files (x86)\Google\google_appengine\lib\fancy_urllib\fancy_urllib\__init__.py", line 78, in __init__
httplib.HTTPSConnection.__init__(self, *args, **kwargs)
  File "C:\Python27\lib\httplib.py", line 1149, in __init__
source_address)
  File "C:\Python27\lib\httplib.py", line 693, in __init__
self._set_hostport(host, port)
  File "C:\Python27\lib\httplib.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.
Danny
  • 3,670
  • 12
  • 36
  • 45

2 Answers2

1

I'll preface this by saying I'm not familiar with the GUI, so feel free to completely disregard :).

The error seems to indicate that you are trying to specify a particular port for deployment, and furthermore, the value of that setting is the word 'port'. When using the commnand line with the dev server, port is an argument you can use to specify a particular port to use; my best guess is that this keyword parameter is still defined (as port) when you are trying to deploy. Is there a section where you can specify command-line flags? Is it possible that port is defined there when deploying?

RocketDonkey
  • 36,383
  • 7
  • 80
  • 84
  • I appreciate the input and inquiry! Here's a screenshot from my project settings: http://i.imgur.com/oPwzC.png . I tried leaving it blank, but that didn't work either. Perhaps I should try doing this command-line style? Do you have a link that describes that process, or care to advise in this comment chain? – Danny Oct 23 '12 at 03:39
  • 1
    @Danny If it has worked for you before, there must be something up :) Does it work locally? Need to step out for a sec, but curious to get this one solved :) – RocketDonkey Oct 23 '12 at 03:47
  • It does work locally. No python exceptions when running the app. GAE updates when running the launcher, yes? Perhaps a recent release of GAE is the culprit? – Danny Oct 23 '12 at 03:48
  • @Danny Out of curiosity, which version of the SDK are you using? – RocketDonkey Oct 23 '12 at 03:59
  • App Engine SDK release: "1.7.2" timestamp: 1345557405 api_versions: ['1'] Python 2.5.2 wxPython 2.8.8.1 (msw-unicode) – Danny Oct 23 '12 at 04:13
  • @Danny When you use the GUI, how do you specify the host to which you are deploying? Also, is it on appspot.com or your own host? – RocketDonkey Oct 23 '12 at 05:40
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/18447/discussion-between-rocketdonkey-and-danny) – RocketDonkey Oct 23 '12 at 05:46
  • As nothing else has worked yet, I'm going to try uninstalling GAE and Python. – Danny Oct 23 '12 at 19:46
  • Complete wipe of GAE and Python worked. Going to answer the question. – Danny Oct 23 '12 at 19:54
  • 1
    @Danny Awesome, that is good to hear. Funny how that ends up solving so many problems :) Good luck with everything! – RocketDonkey Oct 23 '12 at 20:23
0

I've resolved this by completely uninstalling and reinstalling both Python 2.7 and GAE. This complete wipe should include the deletion of any environment variables that have been set since your usage of GAE.

In my case, I think it was particularly the creation of environment proxy variables. A complete wipe of Python and GAE resolved this.

Danny
  • 3,670
  • 12
  • 36
  • 45