[GRASS-dev] [GRASS GIS] #3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
-------------------------+-------------------------
Reporter: bcbernardo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: Default | Version: unspecified
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
In GRASS GIS 7.2.1 (from the QGIS 2.18 suite), running on Windows 7 32
bits SP1, installing any addon with g.extension returns:

{{{
Downloading precompiled GRASS Addons <extension.name>...
"ERROR: Extension <extension.name> not found"
}}}

Running the module with verbose flag on adds the following line to result:

{{{
"Downloading source code for <extension.name> from
<http://wingrass.fsv.cvut.cz/grass72/x86/addons/grass-7.2.1/extension.name.zip&gt;
which is identified as 'remote_zip' type of source..."
}}}

I have been trying to perform these installations for a few days, with no
results, in more than one computer at my workplace. Re-installing QGIS
suite does not appear to make any difference. The company's policy on
downloading and opening executable files will not allow me to install a
GRASS GIS stand-alone. I do can download the zipfile manually from the
wingrass http index, though, which makes me think it is not a matter of
server availability (as reported
[https://gis.stackexchange.com/questions/262210/grass-gis-addon-extension-
not-found-could-the-problem-be-with-the-grass-addon elsewhere]) or
internet access restrictions.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455&gt;
GRASS GIS <https://grass.osgeo.org>

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
--------------------------+-------------------------
  Reporter: bcbernardo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Default | Version: 7.2.1
Resolution: | Keywords:
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+-------------------------
Changes (by hellik):

* platform: Unspecified => MSWindows 7
* version: unspecified => 7.2.1

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
--------------------------+-------------------------
  Reporter: bcbernardo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Default | Version: 7.2.1
Resolution: | Keywords:
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+-------------------------

Comment (by martinl):

Replying to [ticket:3455 bcbernardo]:
> In GRASS GIS 7.2.1 (from the QGIS 2.18 suite), running on Windows 7 32
bits SP1, installing any addon with g.extension returns:
>
{{{
> Downloading precompiled GRASS Addons <extension.name>...
> "ERROR: Extension <extension.name> not found"
}}}

it's not clear how do you run the command, from GRASS Plugin Shell? Anyway
there is no 'extension.name' Addons, see (1)

(1) https://grass.osgeo.org/grass72/manuals/addons/

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
--------------------------+-------------------------
  Reporter: bcbernardo | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.4
Component: Default | Version: 7.2.1
Resolution: worksforme | Keywords:
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+-------------------------
Changes (by annakrat):

* status: new => closed
* resolution: => worksforme

Comment:

Reopen if needed.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
--------------------------+-------------------------
  Reporter: bcbernardo | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.4
Component: Addons | Version: 7.4.0
Resolution: | Keywords:
       CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------
Changes (by vinhussey):

* status: closed => reopened
* cc: vinhussey (added)
* component: Default => Addons
* platform: MSWindows 7 => MSWindows
* version: 7.2.1 => 7.4.0
* resolution: worksforme =>

Comment:

The windows repository seems to be hardcoded to
http://wingrass.fsv.cvut.cz/grass74/x86_64/addons/grass-7.4.4/ (in grass
7.4 at least).

The files are actually located at
http://wingrass.fsv.cvut.cz/grass74/x86_64/addons/grass-7.4.svn/

{{{
     C:\>g.extension
url="http://wingrass.fsv.cvut.cz/grass74/x86_64/addons/grass-7.4.svn/&quot;
     --verbose extension=v.tin.to.rast
     Downloading precompiled GRASS Addons <v.tin.to.rast>...
     Downloading source code for <v.tin.to.rast> from
<http://wingrass.fsv.cvut.cz/grass74/x86_64/addons/grass-7.4.4/v.tin.to.rast.zip&gt;
     which is identified as 'remote_zip' type of source...
     ERROR: Extension <v.tin.to.rast> not found
}}}

As shown above, the url parameter does not appear to work (unless I am not
using it correctly).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
--------------------------+-------------------------
  Reporter: bcbernardo | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.4
Component: Addons | Version: 7.4.0
Resolution: | Keywords:
       CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------

Comment (by vinhussey):

Copy scripts/g.extension.py to another location. Change as below. Run from
File > Launch Script. It now works.

{{{
base_url = "http://wingrass.fsv.cvut.cz/&quot; \
                "grass%(major)s%(minor)s/%(platform)s/addons/" \
                "grass-%(major)s.%(minor)s.%(patch)s" % \
                {'platform': platform,
                 'major': version[0], 'minor': version[1],
                 #'patch': version[2]}
                 'patch': 'svn'}
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
--------------------------+-------------------------
  Reporter: bcbernardo | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.4
Component: Addons | Version: 7.4.0
Resolution: | Keywords:
       CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------

Comment (by hellik):

Replying to [comment:5 vinhussey]:
> The windows repository seems to be hardcoded to
http://wingrass.fsv.cvut.cz/grass74/x86_64/addons/grass-7.4.4/ (in grass
7.4 at least).
>
> The files are actually located at
http://wingrass.fsv.cvut.cz/grass74/x86_64/addons/grass-7.4.svn/
>
> {{{
> C:\>g.extension
url="http://wingrass.fsv.cvut.cz/grass74/x86_64/addons/grass-7.4.svn/&quot;
> --verbose extension=v.tin.to.rast
> Downloading precompiled GRASS Addons <v.tin.to.rast>...
> Downloading source code for <v.tin.to.rast> from
>
<http://wingrass.fsv.cvut.cz/grass74/x86_64/addons/grass-7.4.4/v.tin.to.rast.zip&gt;
> which is identified as 'remote_zip' type of source...
> ERROR: Extension <v.tin.to.rast> not found
> }}}
>
> As shown above, the url parameter does not appear to work (unless I am
not using it correctly).

the subject of the trac ticket is about **Grass 7.2.1v.** in windows.

winGRASS versions:

* GRASS GIS 7.4.4 (old stable)
* GRASS GIS 7.6.1 (new stable)

which winGRASS version are you refering to while reopening the ticket?

>The windows repository seems to be hardcoded to
http://wingrass.fsv.cvut.cz/grass74
>/x86_64/addons/grass-7.4.4/ (in grass 7.4 at least).

precompiled addon python scripts may work between different winGRASS
releases; though it's very unlikely that C addons are working due to
different GRASS library version.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
--------------------------+-------------------------
  Reporter: bcbernardo | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.4
Component: Addons | Version: 7.4.0
Resolution: | Keywords:
       CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------

Comment (by hellik):

Replying to [comment:6 vinhussey]:
> Copy scripts/g.extension.py to another location. Change as below. Run
from File > Launch Script. It now works.
>
> {{{
> base_url = "http://wingrass.fsv.cvut.cz/&quot; \
> "grass%(major)s%(minor)s/%(platform)s/addons/" \
> "grass-%(major)s.%(minor)s.%(patch)s" % \
> {'platform': platform,
> 'major': version[0], 'minor': version[1],
> #'patch': version[2]}
> 'patch': 'svn'}
> }}}

see

https://lists.osgeo.org/pipermail/grass-dev/2019-July/092972.html

for a related dev discussion.

user input/point of view/ideas very appreciated for this discussion.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
--------------------------+-------------------------
  Reporter: bcbernardo | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.4
Component: Addons | Version: 7.4.0
Resolution: | Keywords:
       CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------

Comment (by neteler):

I have created two pull requests:

* master: https://github.com/OSGeo/grass/pull/68
* relbranch76: https://github.com/OSGeo/grass/pull/69

If that works, then also relbranch74 etc. need related updates.

Please test (the pull request contains hints on testing).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455#comment:9&gt;
GRASS GIS <https://grass.osgeo.org>

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
--------------------------+-------------------------
  Reporter: bcbernardo | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.4
Component: Addons | Version: 7.4.0
Resolution: | Keywords:
       CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------

Comment (by vinhussey):

Is the server at http://wingrass.fsv.cvut.cz/ independent of the grass
project? If so there seems to be a risk of this re-occurring, so maybe a
more informative error message would be useful?

The simplest solution to my mind would be to agree a structure with the
maintainer of that server, so that the g.extension.py script is not
broken.

If that is not possible, could we ask the maintainer to provide a sitemap
that could be easily checked?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455#comment:10&gt;
GRASS GIS <https://grass.osgeo.org>

#3455: Grass 7.2.1 returns "Extension(...)not found" when installing addon
--------------------------+-------------------------
  Reporter: bcbernardo | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.2.4
Component: Addons | Version: 7.4.0
Resolution: | Keywords:
       CPU: Unspecified | Platform: MSWindows
--------------------------+-------------------------

Comment (by sbl):

Is this still an issue with more recent versions?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3455#comment:11&gt;
GRASS GIS <https://grass.osgeo.org>