1

When trying to copy information given out by GDALInfo with different kinds of raster data (DEM, normal georeferenced images etc.) through the interface of QGIS 2.2 by right-clicking and choosing copy (I want it in the clipboard) a Python error message keeps appearing. The steps to get this error are as follows: I go over Raster - Miscellaneous - Info in the menu bar. Then I right click the information that's shown in the resulting window and choose "copy all" or "copy". It's basically the equivalent of the QGIS GUI to entering gdalinfo and the location of the raster in the OSGEO4W shell. Only solution is to either enter all data manually in the program i want it in, or to use the OSGEO4W shell and copy the info about the raster from there (since it's not possible to do that out of properties of raster data in QGIS). This is the error message that shows up every time I try, was like this in QGIS 2.0, and it hasn't changed in 2.2:

Fehler bei der Ausführung von Python-Code:

Traceback (most recent call last):
File "C:/PROGRA~2/QGISVA~1/apps/qgis/./python/plugins\GdalTools\tools\doInfo.py",   
line 73, in doCopyLine
output.append( r.text() + "\n" )
AttributeError: 'str' object has no attribute 'append'




Python-Version:
2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]


QGIS-Version:
2.2.0-Valmiera Valmiera, c3a2817

Python-Pfad: ['C:/PROGRA~2/QGISVA~1/apps/qgis/./python/plugins\\processing',   
'C:/PROGRA~2/QGISVA~1/apps/qgis/./python', u'C:/Users/Lars/.qgis2/python', u'C:/Users 
/Lars/.qgis2/python/plugins', 'C:/PROGRA~2/QGISVA~1/apps/qgis/./python/plugins', 
'C:\\PROGRA~2\\QGISVA~1\\bin\\python27.zip', 'C:\\PROGRA~2\\QGISVA~1\\apps\\Python27  
\\DLLs', 'C:\\PROGRA~2\\QGISVA~1\\apps\\Python27\\lib', 'C:\\PROGRA~2\\QGISVA~1\\apps
\\Python27\\lib\\plat-win', 'C:\\PROGRA~2\\QGISVA~1\\apps\\Python27\\lib\\lib-tk', 
'C:\\PROGRA~2\\QGISVA~1\\bin', 'C:\\PROGRA~2\\QGISVA~1\\apps\\Python27', 'C:\\PROGRA~2
\\QGISVA~1\\apps\\Python27\\lib\\site-packages', 'C:\\PROGRA~2\\QGISVA~1\\apps
\\Python27\\lib\\site-packages\\PIL', 'C:\\PROGRA~2\\QGISVA~1\\apps\\Python27
\\lib\\site-packages\\win32', 'C:\\PROGRA~2\\QGISVA~1\\apps\\Python27\\lib\\site-
packages\\win32\\lib', 'C:\\PROGRA~2\\QGISVA~1\\apps\\Python27\\lib\\site-packages
\\Pythonwin', 'C:\\PROGRA~2\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\Shapely-
1.2.18-py2.7-win32.egg', 'C:\\PROGRA~2\\QGISVA~1\\apps\\Python27\\lib\\site-packages
\\wx-2.8-msw-unicode', 'C:\\PROGRA~2\\QGISVA~1\\apps\\qgis\\python\\plugins\\fTools
\\tools']
  • Can you add the steps before you get the error? Using the identify tool on a SRTM raster, and clicking on the channel 1 value works for me in Windows XP. Or are you looking for the metadata? – AndreJ Mar 25 '14 at 9:57
  • I mean going over Raster - Miscellaneous - Info. I want to copy all informations about the raster (especially the boundaries) into a text file, not view individual pixel values. – Lordon Mar 25 '14 at 12:35
1

Ok confirmed here, with QGIS 2.0.1 and 2.2 on XP.

As a workaround, you can copy the GDAL command line built by QGIS, insert it in a OSGeo4W shell and expand it to:

gdalinfo D:/Karten/SRTM/N51E006.hgt > info.txt

which gives you the result in a file.

Unfortunately, this does not work with the command line inside the QGIS GUI.


I think this is worth a bug report. Would you like to report it to http://hub.qgis.org?

  • I cannot log in into qgis hub because there is no register form (googled it and other people seem to have reported this somewhere). – Lordon Mar 25 '14 at 13:55
  • You have to register at osgeo.org, the parent project of QGIS: hub.qgis.org/wiki/quantum-gis/Bugreports. QGIS login will be with the same ID/Password. – AndreJ Mar 25 '14 at 14:06
  • Doesn't work, sorry, I can see no register field there, I tried registering at the OSGEO-wiki, but the login from there doesn't work on the OSGEO.org and qgis Hub-pages. Can you point me to the exact registering page instead of the main page? – Lordon Mar 25 '14 at 14:33
  • The page I linked has a link to www2.osgeo.org/cgi-bin/ldap_create_user.py where you can register. Then you can login at osgeo.org/user. If that is successfull, you can login at hub.qgis.org as well. – AndreJ Mar 25 '14 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.