Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDAL python tools are broken in QGIS 3.4.4/master #29028

Closed
qgib opened this issue Feb 8, 2019 · 11 comments
Closed

GDAL python tools are broken in QGIS 3.4.4/master #29028

qgib opened this issue Feb 8, 2019 · 11 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS High Priority Regression Something which used to work, but doesn't anymore

Comments

@qgib
Copy link
Contributor

qgib commented Feb 8, 2019

Author Name: Giovanni Manghi (@gioman)
Original Redmine Issue: 21210
Affected QGIS version: 3.5(master)
Redmine category:windows_package


for example gdal_merge

GDAL command:
cmd.exe /C gdal_merge.bat -ot Float32 -of GTiff -o C:/Users/qgis/AppData/Local/Temp/processing_7c972bb45de649dba703b37af8e39225/a14f75dc2cc3467ea263dfff8f94899e/OUTPUT.tif --optfile C:/Users/qgis/AppData/Local/Temp/processing_7c972bb45de649dba703b37af8e39225\mergeInputFiles.txt
GDAL command output:
'gdal_merge.bat' is not recognized as an internal or external command,

@qgib
Copy link
Contributor Author

qgib commented Feb 8, 2019

Author Name: Alexander Bruy (@alexbruy)


I can confirm on Windows with master/3.4, but errors are a slightly different. 3.4 complains about missed gdal_merge.bat, while in master it can not find gdal_merge.py

@qgib
Copy link
Contributor Author

qgib commented Feb 8, 2019

Author Name: Giovanni Manghi (@gioman)


Alexander Bruy wrote:

I can confirm on Windows with master/3.4, but errors are a slightly different. 3.4 complains about missed gdal_merge.bat, while in master it can not find gdal_merge.py

confimed here the slightly different message.

@qgib
Copy link
Contributor Author

qgib commented Feb 8, 2019

Author Name: Nyall Dawson (@nyalldawson)


So this is an osgeo4w packaging issue, right? Not qgis?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Feb 9, 2019

Author Name: Giovanni Manghi (@gioman)


Nyall Dawson wrote:

So this is an osgeo4w packaging issue, right? Not qgis?

probably, but I'm afraid that at this point filing this bug only in the ogseo4w bug tracker will pass unnoticed and we will ship a new release with such important tools broken.

@qgib
Copy link
Contributor Author

qgib commented Feb 9, 2019

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open

@qgib
Copy link
Contributor Author

qgib commented Feb 9, 2019

Author Name: Nyall Dawson (@nyalldawson)


  • category_id was changed from Processing/GDAL to Windows Package

@qgib
Copy link
Contributor Author

qgib commented Feb 10, 2019

Author Name: Alexander Bruy (@alexbruy)


OSGeo4W ticket https://trac.osgeo.org/osgeo4w/ticket/594

@qgib
Copy link
Contributor Author

qgib commented Feb 10, 2019

Author Name: Jürgen Fischer (@jef-n)


Giovanni Manghi wrote:

'gdal_merge.bat' is not recognized as an internal or external command,

Does @gdal_merge.bat@ exist in @%OSGEO4W_ROOT%\bin@? Should have been created by @etc/postinstall/gdal-python.bat@ (which runs @bin/make-bat-for-py.bat@) after @gdal-python@ was installed.

@qgib
Copy link
Contributor Author

qgib commented Feb 10, 2019

Author Name: Jürgen Fischer (@jef-n)


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Feb 10, 2019

Author Name: Jürgen Fischer (@jef-n)


Alexander Bruy wrote:

I can confirm on Windows with master/3.4, but errors are a slightly different. 3.4 complains about missed gdal_merge.bat, while in master it can not find gdal_merge.py

Oh, well. Findings so far: 3.4 runs the batch files which only @gdal-python@ (GDAL Py2 bindings) provides - but it's didn't depend on it, because QGIS normally uses python3 - hence the batch files calls fail. It starts working once that is installed (and a dependency was added).

master was changed to run the scripts directly with python3 (see #28689). That only helps if if the scripts are in the current working directory - but that usually
is @%OSGEO4W_ROOT%\bin@, which also happens to be where @gdal-python@ puts the scripts - intended for py2, but not any different from those for py3. So with @gdal-python@ scripts installed it should work there too - often.

My expectation was, that python would look in @path@ or @PythonPath@ for script files - apparently not happening.

@qgib
Copy link
Contributor Author

qgib commented Feb 10, 2019

Author Name: Jürgen Fischer (@jef-n)


Applied in changeset eea4eda.


  • done_ratio was changed from 0 to 100
  • status_id was changed from Feedback to Closed

@qgib qgib closed this as completed Feb 10, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Build/Install Related to compiling or installing QGIS Regression Something which used to work, but doesn't anymore labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS High Priority Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant