I'm trying to use the "Rectangles, ovals, diamonds (variable)" processing tool, using QGIS 3.0. One of the fields in my attribute table is a number going from 0 to 359 which is a reference to the "heading" direction of each point (meaning degrees..).

When I try to use this column as the Rotation field in the tool I get an error:

Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\algs\qgis\RectanglesOvalsDiamondsVariable.py", line 119, in processAlgorithm
self.rectangles(sink, source, width, height, rotation, feedback)
File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\algs\qgis\RectanglesOvalsDiamondsVariable.py", line 145, in rectangles
feedback.pushInfo(QCoreApplication.translate('RectanglesOvalsDiamondsVariable', 'Feature {} has empty '
NameError: name 'QCoreApplication' is not defined

Execution failed after 0.01 seconds

It will accept various other fields as the Rotation field, most being random numbers. I've tried changing the type of my field from double to Integer and Int64 using the Refactoring Fields tool, but still the same issue.

1 Answer 1


This was a bug in QGIS 3.0 [1] - it's fixed in the upcoming 3.2 release.

As a workaround, try filtering out rows from your table where heading is Null and run the algorithm over the filtered result.

[1] https://github.com/qgis/QGIS/commit/6bf5274b11b9542f6835e54a1075aa6f7967b827

  • I had rows where heading was 0. After changing them to 360 it worked fine. Thanks for the help!
    – anthonyB
    May 30, 2018 at 14:11
  • That's another silly bug in the algorithm...! Fixed in github.com/qgis/QGIS/pull/7121
    – ndawson
    May 30, 2018 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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