atreebangalore/jaltol

SPS shapefile ,SW & Crop Name errors

Opened this issue · 0 comments

Describe the bug
Getting Water Budget data for SPS regions:- All shapefiles are selecting automatically, Sometimes no data is showing in location field,resulted in SW error and Crop Name not matching error.

To Reproduce
If using a custom shapefile please upload ZIP of the same to project google drive folder GISLayers and add link below.
https://drive.google.com/drive/u/0/folders/12MAMLNbiXL7I04tNWFEP73CPNk6eWNIp
Steps to reproduce the behavior:

  1. Select the feature using select tool
  2. In Water budget tab under agriculture - click calculate
  3. In water availability tab under surface water - click calculate

Expected behavior
Water Budget Calculation - get amount of water required for crop
Water Availability Calculation - get Surface water available and Map of the SW layer

Screenshots
image

Desktop (please complete the following information):

  • OS Name and Version : [e.g. Windows 10, Ubuntu 20.0]
  • QGIS Version: [e.g. 3.26]

Additional context
Add any other context about the problem here.
2023-02-22T12:11:38 WARNING Traceback (most recent call last):
File "C:\Users/ATREE/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\jaltol\gui\jt_home_dockwidget.py", line 143, in on_change_in_aoi
self.resetVillageDetails()
File "C:\Users/ATREE/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\jaltol\gui\jt_home_dockwidget.py", line 183, in resetVillageDetails
self.activeLDict = self.vlgsel_cascade.popCattlePopulation()
File "C:\Users/ATREE/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\jaltol\gui\jt_village_cascade_widget.py", line 328, in popCattlePopulation
if dn is None:
UnboundLocalError: local variable 'dn' referenced before assignment

2023-02-22T12:17:14 WARNING Traceback (most recent call last):
File "C:\Users/ATREE/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\jaltol\gui\jt_waterbudget_widget.py", line 358, in initCropWaterRequirement
self.calcCropWaterRequirement()
File "C:\Users/ATREE/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\jaltol\gui\jt_waterbudget_widget.py", line 371, in calcCropWaterRequirement
self.crop_details = self.crops_dict.get_crop_details(5) # 5 is no. of crops needed for a season
File "C:\Users/ATREE/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\jaltol\libs\jaltol_cropwaterrequirement.py", line 86, in get_crop_details
self.get_kc_list(row['crop']),
File "C:\Users/ATREE/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\jaltol\libs\jaltol_cropwaterrequirement.py", line 146, in get_kc_list
return kc_dict[crop]
KeyError: 'Moong(GreenGram)'