Closed pcav closed 8 years ago
Paolo,
thank you for the traceback. Can you please provide some additional info:
The changeCellValue method is called when the user hits Enter or the green arrow is clicked. Are you sure the error shows up when you click on a raster?
Radek
Thanks anyway! I will add some preliminary checks:
I have this error too on the very first use of the plugin after its installation. It happens when clicking the green arrow button:
On this raster:
Driver: GTiff/GeoTIFF
Files: DTM_1000x1000.tif
Size is 1000, 1000
Coordinate System is:
PROJCS["ETRS89 / UTM zone 32N",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS 1980",6378137,298.2572221010002,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4258"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","25832"]]
Origin = (440000.000000000000000,6410000.000000000000000)
Pixel Size = (460.000000000000000,-370.000000000000000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
COMPRESSION=DEFLATE
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 440000.000, 6410000.000) ( 7d59'23.10"E, 57d49'40.51"N)
Lower Left ( 440000.000, 6040000.000) ( 8d 4'24.31"E, 54d30'14.58"N)
Upper Right ( 900000.000, 6410000.000) ( 15d42'32.99"E, 57d39'14.04"N)
Lower Right ( 900000.000, 6040000.000) ( 15d 9'28.29"E, 54d21' 1.32"N)
Center ( 670000.000, 6225000.000) ( 11d44' 9.73"E, 56d 8'22.93"N)
Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
NoData Value=-9999
Ah, I see it is not the exact same error, but probably related to the fix of the error reported by @pcav
Asger, thanks for the comment! Does the error occur when you first click a raster cell and then the green arrow? For now (without the fix mentioned earlier) the array is created when a user clicks a cell. If there is no raster cell selected there is nothing to operate on - I will add a check for that.
I do not recall exactly, but I'd say yes (sorry I haven't time for a proper check now). Thanks for following this up.
@erpas It wasn't immediately obvious to me how the plugin worked, so I entered a new raster value, clicked the green arrow and then clicked the cell which I wanted to update. Then got the exception
Asger, thanks for that! I will keep this in mind and will inform a user if he/she decides to save a new cell value before actually selecting the cell.
When clicking on a raster I get:
2016-01-05T15:28:33 1 Traceback (most recent call last): File "/home/paolo/.qgis2/python/plugins/Serval/serval_widget.py", line 99, in changeCellValue self.array[0][0] = float(self.valueEdit.text()) AttributeError: 'ServalWidget' object has no attribute 'array'