Opened 2 years ago

Last modified 4 months ago

#3455 reopened defect

Grass 7.2.1 returns "Extension(...)not found" when installing addon

Reported by: bcbernardo Owned by: grass-dev@…
Priority: normal Milestone: 7.2.4
Component: Addons Version: 7.4.0
Keywords: Cc: vinhussey
CPU: Unspecified Platform: MSWindows

Description

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> 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 elsewhere) or internet access restrictions.

Change History (10)

comment:1 Changed 2 years ago by hellik

Platform: UnspecifiedMSWindows 7
Version: unspecified7.2.1

comment:2 in reply to:  description Changed 2 years ago by martinl

Replying to 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/

comment:3 Changed 20 months ago by martinl

Milestone: 7.2.4

comment:4 Changed 7 months ago by annakrat

Resolution: worksforme
Status: newclosed

Reopen if needed.

comment:5 Changed 4 months ago by vinhussey

Cc: vinhussey added
Component: DefaultAddons
Platform: MSWindows 7MSWindows
Resolution: worksforme
Status: closedreopened
Version: 7.2.17.4.0

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/" 
    --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>
    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 issues appears to be in function install_extension_win(name) at line 1011 of https://github.com/OSGeo/grass/blob/master/scripts/g.extension/g.extension.py

base_url = "http://wingrass.fsv.cvut.cz/" \
               "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]}
Last edited 4 months ago by vinhussey (previous) (diff)

comment:6 Changed 4 months ago 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/" \
               "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'}

comment:7 in reply to:  5 Changed 4 months ago by hellik

Replying to 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/" 
    --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>
    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.

comment:8 in reply to:  6 Changed 4 months ago by hellik

Replying to 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/" \
               "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.

comment:9 Changed 4 months ago by neteler

I have created two pull requests:

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

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

comment:10 Changed 4 months ago 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?

Note: See TracTickets for help on using tickets.