atreebangalore / jaltol

a QGIS python plugin to make typology-specific Rural Water Security Plans. These plans help lead the user from data to decisions
MIT License
4 stars 3 forks source link

SPS shapefile ,SW & Crop Name errors #9

Open vidhyakatral opened 1 year ago

vidhyakatral commented 1 year ago

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):

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)'