Error in Keywords creation wizard for flood raster layer (using meters as unit) #2111

Closed
machakux opened this Issue Jul 10, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@machakux

Error in creating a keywords for a raster layer using keywords creation wizard.

When creating keyword using the wizard everything goes well except in the last stage which gives the TypeError

An error has occured while executing Python code:


Traceback (most recent call last):
  File "/home/user/.qgis2/python/plugins/inasafe/safe/gui/tools/wizard_dialog.py", line 3014, in on_pbnNext_released
    self.set_widgets_step_kw_source()
  File "/home/user/.qgis2/python/plugins/inasafe/safe/gui/tools/wizard_dialog.py", line 1404, in set_widgets_step_kw_source
    self.leSource_date.setText(source_date)
TypeError: QLineEdit.setText(QString): argument 1 has unexpected type 'int'


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


QGIS version:
2.8.2-Wien Wien, exported

Python path: ['/usr/share/qgis/python/plugins/processing', '/home/user/.qgis2/python/plugins/GeoCoding/libs', '/usr/share/qgis/python', u'/home/user/.qgis2/python', u'/home/user/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/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/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', u'/home/user/.qgis2//python', '/home/user/.qgis2/python/plugins/mmqgis/forms', '/home/user/.qgis2/python/plugins/inasafe', '/home/user/.qgis2/python/plugins/inasafe/safe_extras/parameters', '/home/user/.qgis2/python/plugins', '/home/user/.qgis2/python/plugins/inasafe/safe_extras', '/usr/share/qgis/python/plugins/fTools/tools']

Things seems to work fine if I create the keyword file manually using a text editor

category: hazard
subcategory: flood
unit: meters
...

QGIS version: 2.8.2
Inasafe version: 3.1.0 (Installed from default QGIS plugin repository)
OS: Ubuntu 14.04 64bit

cc: @vdeparday

@timlinux

This comment has been minimized.

Show comment
Hide comment
@timlinux

timlinux Jul 10, 2015

Contributor

Was it a raster or vector flood layer you had @machakux ?

Contributor

timlinux commented Jul 10, 2015

Was it a raster or vector flood layer you had @machakux ?

@timlinux

This comment has been minimized.

Show comment
Hide comment
@timlinux

timlinux Jul 10, 2015

Contributor

Also could you share the dataset you used so that we can test with it?

Contributor

timlinux commented Jul 10, 2015

Also could you share the dataset you used so that we can test with it?

@machakux

This comment has been minimized.

Show comment
Hide comment
@machakux

machakux Jul 10, 2015

It was a raster layer @timlinux

It was a raster layer @timlinux

@ismailsunni ismailsunni referenced this issue Jul 13, 2015

Merged

Fix 2111 #2122

@ismailsunni

This comment has been minimized.

Show comment
Hide comment
@ismailsunni

ismailsunni Jul 13, 2015

Member

From my investigation:
The wizard save a string as a integer (in this case, source's date), if it's only contains integer character (e.g. 2015, 1234, etc). *Based on the error message.

I have fixed it and made a PR in #2122

Member

ismailsunni commented Jul 13, 2015

From my investigation:
The wizard save a string as a integer (in this case, source's date), if it's only contains integer character (e.g. 2015, 1234, etc). *Based on the error message.

I have fixed it and made a PR in #2122

@timlinux

This comment has been minimized.

Show comment
Hide comment
@timlinux

timlinux Jul 15, 2015

Contributor

Thanks @ismailsunni - can you backport to master too please?

Contributor

timlinux commented Jul 15, 2015

Thanks @ismailsunni - can you backport to master too please?

ismailsunni added a commit to ismailsunni/inasafe that referenced this issue Jul 15, 2015

ismailsunni added a commit that referenced this issue Jul 17, 2015

ismailsunni added a commit that referenced this issue Jul 21, 2015

Merge pull request #2129 from ismailsunni/backport_2111
Backport issue #2111
I will merge this since the failed test is not related to my backport. And in this PR contains urgent commit to make travis works again.

@ismailsunni ismailsunni referenced this issue Jul 22, 2015

Closed

Python Error on aggregation keyword process #2128

0 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment