CSIRO-Precision-Agriculture / pyprecag

A suite of tools for Precision Agriculture
Other
21 stars 9 forks source link

Error when running the Clean, Trim and Normalise function #44

Closed steverichmondnas closed 1 year ago

steverichmondnas commented 1 year ago

Am new to QGIS and PAT, and also have no back ground in coding

Am attempting to run the Clean, Trim and Normalise function in PAT

Am getting the following error

image

With following text in the log

2023-01-03T15:55:01 INFO QGIS Environment : QGIS : 3.28.2-Firenze Python : 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] GDAL : None PAT : 1.0.4 2021-12-08T16:20:50.896294 Log File : C:\Users\Nutrien\AppData\Local\Temp\PrecisionAg\PAT.log

2023-01-03T15:55:01 WARNING Environment Variable GDAL_VERSION does not exist. Setting to 3.6.1 2023-01-03T15:58:15 INFO ** Processing Clean, trim and normalise point data 2023-01-03T15:58:15 INFO Parameters:--------------------------------------- Layer: CSIRO-Precision-Agriculture/PAT_QGIS_Plugin#13 2021 Wheat Yield Process Field: Dry_Yield Drop all other fields False Thinning Distance: 1.0m Remove Zeros: True Standard Devs to Use: 3.0 Trim Iteratively: True Output Projected Coordinate System: EPSG:28354 - GDA94 / MGA zone 54 Saved CSV File: C:\Users\Nutrien\Desktop#13 2021 Clark Bros Wheat#13 2021 Wheat Yield_Dry_Yield_normtrimmed.csv Saved Points: C:\Users\Nutrien\Desktop#13 2021 Clark Bros Wheat#13 2021 Wheat Yield_Dry_Yield_normtrimmed.shp Saved Removed Points: C:\Users\Nutrien\Desktop#13 2021 Clark Bros Wheat#13 2021 Wheat Yield_Dry_Yield_normtrimmed_removedpts.shp 2023-01-03T15:59:36 INFO Normalized Column is nrm_Dry_Yield 2023-01-03T15:59:38 INFO Remove Duplicate XYs 0 0:00:01.548621 2023-01-03T15:59:39 INFO Filter by column 140,255 Dry_Yield (zeros, norm, 3.0 std) 0:00:02.450062 2023-01-03T15:59:42 INFO Filter by distance - XY (1.0m) 42,001 0:00:00.517401 del 98254 pts 2023-01-03T15:59:42 INFO Filter by distance - X (1.0m) 42,000 0:00:00.190867 del 1 pts 2023-01-03T15:59:43 INFO Filter by distance - Y (1.0m) 42,000 0:00:00.221280 del 0 pts 2023-01-03T15:59:52 CRITICAL issubclass() arg 1 must be a class Traceback (most recent call last): File "C:\Users/Nutrien/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\pat\gui\cleanTrimPointswizard.py", line 1061, in accept = processing.clean_trim_points(gdfPoints, gdfPtsCrs, self.processField(), File "C:\PROGRA~1\QGIS32~1.2\apps\Python39\lib\site-packages\pyprecag\processing.py", line 573, in clean_trim_points results_table = results_table.groupby(['filter_inc', 'filter']).size() \ File "C:\PROGRA~1\QGIS32~1.2\apps\Python39\lib\site-packages\pandas\core\groupby\groupby.py", line 1527, in size if issubclass(self.obj._constructor, Series): TypeError: issubclass() arg 1 must be a class

Any pointers or suggestions please

Thanks

aleksyaremenko commented 1 year ago

Have the same problem