3

I use the numerical digitize plugin often and it no longer functions in versions of QGIS released after 3.18. Please help or offer another option.

The error is as follows

2023-03-25T14:42:28     WARNING    Traceback (most recent call last):
  File "/home/jasonowsley/.local/share/QGIS/QGIS3/profiles/default/python/plugins/numericalDigitize/numericalDigitize.py", line 194, in run
  self.__dlg.configureDialog(self.__layergeometryType, self.__layerwkbType, self.__isMultiType,
  File "/home/jasonowsley/.local/share/QGIS/QGIS3/profiles/default/python/plugins/numericalDigitize/addFeatureGUI.py", line 210, in configureDialog
  self.twPoints.setColumnWidth(i, self.twPoints.width()/self.twPoints.columnCount())
 TypeError: setColumnWidth(self, int, int): argument 2 has unexpected type 'float'
         

In addition, under the processing tab I see this:

2023-03-25T14:42:15     CRITICAL    Problem with OTB installation: OTB folder is not set.
2023-03-25T14:42:15     CRITICAL    Problem with SAGA installation: SAGA was not found or is not correctly installed
2
  • I've changed the title (2.18 -> 3.18). Should it be 2.18? What did you mean, 2.18 or 3.18? Commented Mar 25, 2023 at 23:25
  • yes i meant 3.18 thank you Commented Mar 27, 2023 at 0:45

1 Answer 1

5

I guess you found a bug. For a temporary solution, you can try the follows:

  1. Go to the plugin folder (Settings > User Profiles > Open Active Profile Folder, and navigate to python > plugins > numericalDigitize)

  2. Open addFeatureGUI.py. Find the line starting with self.twPoints.setColumnWidth(... (Line 210).

    enter image description here

  3. Change self.twPoints.width()/self.twPoints.columnCount() to int(self.twPoints.width()/self.twPoints.columnCount())

    enter image description here

The problem is that a float value is passed to the setColumnWidth function. However, it has to be an integer value.

From Documentation:

setColumnWidth()
void QgsAttributeTableConfig::setColumnWidth(int column, int width)

1
  • That's great it took care of the issue. Commented Mar 25, 2023 at 22:58

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