Skip to content

wxGUI/dbmgr: fix get statistics for character column type if it contains NULL value#1574

Merged
tmszi merged 1 commit into
OSGeo:masterfrom
tmszi:fix-g-gui-dbmgr-stats-char-col
May 14, 2021
Merged

wxGUI/dbmgr: fix get statistics for character column type if it contains NULL value#1574
tmszi merged 1 commit into
OSGeo:masterfrom
tmszi:fix-g-gui-dbmgr-stats-char-col

Conversation

@tmszi

@tmszi tmszi commented May 14, 2021

Copy link
Copy Markdown
Member

To Reproduce
Steps to reproduce the behavior:

  1. Launch wxGUI Attribute Table Manager g.gui.dbmgr map=geology (Basic NC location)
  2. Erase (set NULL) column 'GEO_NAME' value for row with column cat = 1
  3. Right mouse click on the 'GEO_NAME' column and choose from the menu Statistics item
  4. An empty Statistics window opened, and you see error message in the wxGUI Console tab

Error message

Traceback (most recent call last):
  File "/usr/lib64/grass79/gui/wxpython/dbmgr/base.py", line
654, in OnFieldStatistics

column=self.GetColumn(self._col).GetText(),
  File "/usr/lib64/grass79/gui/wxpython/dbmgr/base.py", line
4054, in Update

varSum += float(var)
ValueError
:
could not convert string to float:

@tmszi tmszi added bug Something isn't working GUI wxGUI related labels May 14, 2021

@petrasovaa petrasovaa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@tmszi tmszi merged commit 5a2917c into OSGeo:master May 14, 2021
tmszi added a commit to tmszi/grass that referenced this pull request May 14, 2021
@tmszi tmszi deleted the fix-g-gui-dbmgr-stats-char-col branch May 14, 2021 18:55
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working GUI wxGUI related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants