[GRASS-dev] [GRASS GIS] #3179: g.extension not installing addons behind proxy

GRASS GIS trac at osgeo.org
Mon Oct 10 08:32:58 PDT 2016

#3179: g.extension not installing addons behind proxy
 Reporter:  madi                        |      Owner:  grass-dev@…
     Type:  defect                      |     Status:  new
 Priority:  normal                      |  Milestone:  7.4.0
Component:  Addons                      |    Version:  unspecified
 Keywords:  g.extension, proxy, addons  |        CPU:  Unspecified
 Platform:  Unspecified                 |
 Related to https://lists.osgeo.org/pipermail/grass-

 when i try to use g.extension behind a proxy, following the example from
 the manual, it gives me the following error:

 g.extension ext=i.segment.hierarchical proxy="http://xx.xxx.xxx.xx:xxxx"
 Traceback (most recent call last):
   File "/usr/local/grass-7.3.svn/scripts/g.extension", line 1730, in
   File "/usr/local/grass-7.3.svn/scripts/g.extension", line 1675, in main
     for ptype, purl in (p.split('=') for p in
 ValueError: need more than 1 value to unpack

 Using the form suggested by Pietro:


 g.extension ext=i.segment.hierarchical


 Fetching <i.segment.hierarchical> from GRASS GIS Addons repository (be
 ERROR: Extension <i.segment.hierarchical> not found

 which is exactly the same as if I don't indicate the proxy at all.

 FWIW, I normally use urllib2 to handle the proxy. However I have some
 difficulties to apply this simple method to the 1700+ rows code (handling
 several different addons sources for several os's) of g.extension, but I'm
 behind a proxy and I'm available to test if you have a patch.

 Here's what I do in python:

 import urllib2
 import os
 proxy = urllib2.ProxyHandler({'http':os.environ['HTTP_PROXY']})
 opener = urllib2.build_opener(proxy)


Ticket URL: <https://trac.osgeo.org/grass/ticket/3179>
GRASS GIS <https://grass.osgeo.org>

More information about the grass-dev mailing list