enricofer / undoPropertiesChanges

qgis plugin to undo/redo changes on layer properties
0 stars 0 forks source link

Plugin error if in a starting project the user discard some layers #2

Open marcobra opened 9 years ago

marcobra commented 9 years ago

A starting project layer is not more in place, the user discard it (do not restore it), the plugin give this error:

Errore durante l'esecuzione di codice Python:

Traceback (most recent call last): File "/home/ubuntu/.qgis2/python/plugins/undoPropertiesChanges/undopropertieschanges.py", line 245, in layersRemovedAction del self.undo[layerId] KeyError: u'progetti20150501025643240'

Versione Python: 2.7.6 (default, Mar 22 2014, 23:03:41) [GCC 4.8.2]

Versione di QGIS: 2.8.1-Wien Wien, exported

Percorso Python: ['/home/ubuntu/.qgis2/python/plugins/postgis_geoprocessing', '/home/ubuntu/.qgis2/python/plugins/processing', '/usr/share/qgis/python', u'/home/ubuntu/.qgis2/python', u'/home/ubuntu/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/csvkit-0.9.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/dbf-0.94.003-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/python_dateutil-2.2-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/six-1.8.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/openpyxl-2.1.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/SQLAlchemy-0.9.7-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/xlrd-0.9.3-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/jdcal-1.0-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode', u'/home/ubuntu/.qgis2//python', '/home/ubuntu/.qgis2/python/plugins/SelectTools/tools', '/home/ubuntu/.qgis2/python/plugins/mmqgis/forms', '/home/ubuntu/.qgis2/python/plugins/DataDrivenInputMask', '/home/ubuntu/.qgis2/python/plugins/HouseNumbering/forms', '/home/ubuntu/.qgis2/python/plugins/StreamFeatureExtractor/third_party', '/home/ubuntu/.qgis2/python/plugins/QuickMultiAttributeEdit/forms', '/usr/share/qgis/python/plugins/fTools/tools', '/home/ubuntu/normalizza_vie']

enricofer commented 9 years ago

Do you mean you remove a previuosly added layer leaving a blank, not saved project? Can you help me to replicate issue from scratch?

marcobra commented 9 years ago

i mean on a saved project, discard previous used layer not more in range... (the layer was a /tmp layer) Hth

enricofer commented 9 years ago

I cannot replicate issue. Please send me sample data and step by step instructions to get described error.

2015-05-08 1:28 GMT+02:00 marcobra notifications@github.com:

i mean on a saved project, discard previous used layer not more in range... (the layer was a /tmp lasyer) Hth

— Reply to this email directly or view it on GitHub https://github.com/enricofer/undoPropertiesChanges/issues/2#issuecomment-100046075 .

marcobra commented 9 years ago

1) create an empty project 2) using quickosm plugin download some data from osm or simply store a vector layer into a dir (/tmp/ in this sample) 3) save them it in /tmp dir or where you prefer 4) save the project 5) exit from qgis 6) delete some /tmp/ stored layer 7) start qgis and open previously saved qgis project 8) a warning dialog about of missing layer come out

And after pressing Ok

Traceback (most recent call last): File "/home/ubuntu/.qgis2/python/plugins/undoPropertiesChanges/undopropertieschanges.py", line 245, in layersRemovedAction del self.undo[layerId] KeyError: u'temp20150512010116394'

marcobra commented 8 years ago

Still issue after opening a mapnik background (using http://plugins.qgis.org/plugins/quick_map_services/) and then exit from project discarding changes

An error has occurred while executing Python code:

KeyError: u'OSM_Mapnik20160301093030869' Traceback (most recent call last): File "/home/ubuntu/.qgis2/python/plugins/undoPropertiesChanges/undopropertieschanges.py", line 245, in layersRemovedAction del self.undo[layerId] KeyError: u'OSM_Mapnik20160301093030869'