Thursday, 26 January 2012

using play dependencies behind a proxy

It took me some googling and some time to find this


play dependencies --sync --verbose -Dhttp.proxyHost=<your proxy host> -Dhttp.proxyPort=<your proxy port>
and if you get an error like this

Traceback (most recent call last):
  File "C:\programs\play\play-1.2.3\play", line 153, in 
    status = cmdloader.commands[play_command].execute(command=play_command, app=play_app, args=remaining_args, env=play_env, cmdloader=cmdloader)
  File "C:\programs\play\play-1.2.3\framework\pym\play\commands\modulesrepo.py", line 58, in execute
    install(app, args, env)
  File "C:\programs\play\play-1.2.3\framework\pym\play\commands\modulesrepo.py", line 378, in install
    Downloader().retrieve(fetch, archive)
  File "C:\programs\play\play-1.2.3\framework\pym\play\commands\modulesrepo.py", line 88, in retrieve
    try: urllib.urlretrieve(url, destination, self.progress)
  File "C:\programs\play\play-1.2.3\python\lib\urllib.py", line 94, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "C:\programs\play\play-1.2.3\python\lib\urllib.py", line 235, in retrieve
    fp = self.open(url, data)
  File "C:\programs\play\play-1.2.3\python\lib\urllib.py", line 198, in open
    return self.open_unknown_proxy(proxy, fullurl, data)
  File "C:\programs\play\play-1.2.3\python\lib\urllib.py", line 217, in open_unknown_proxy
    raise IOError, ('url error', 'invalid proxy for %s' % type, proxy)
IOError: [Errno url error] invalid proxy for http: '<your proxy>:<your port>'
Then try ( in windows )

set http_proxy=http://<your proxy>:<your port>
it seems to want the "http://" prefix...

 Hope this helps!

No comments: