PrathamGitHub / NITK_RS-GIS_17

A QGIS plugin to work with Landsat and LISS (satellite) data to produce standard outputs
Other
11 stars 5 forks source link

Error - local variable 'bq_filename' referenced before assignment #16

Open rhtjuneja opened 2 years ago

rhtjuneja commented 2 years ago

Hi,

I have been trying to use this plugin for my research but there is an error that pops up when i run it.

For Land Surface Temperature:

:-( Error:

Traceback (most recent call last): File "C:/Users/dell/.qgis2/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 2131, in run lst_cal_w_del(num) File "C:/Users/dell/.qgis2/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1819, in lst_cal_w_del ndvi_cal(num) File "C:/Users/dell/.qgis2/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1741, in ndvi_cal reflectance_cal(num, 'r') File "C:/Users/dell/.qgis2/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1466, in reflectance_cal get_band_data(num, band_info[2], band_info[1], band_info[3]) File "C:/Users/dell/.qgis2/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1046, in get_band_data Quality_band(num) File "C:/Users/dell/.qgis2/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 979, in Quality_band dataset = gdal.Open(bq_filename, GA_ReadOnly) UnboundLocalError: local variable 'bq_filename' referenced before assignment

Any help to solve it would be appreciated! Thanks

PrathamGitHub commented 2 years ago

Hi .. Sorry but I could not recreate the error .. Can you please share if you still face the same error?

FPYS commented 2 years ago

Hi, I'm having the same error using Landsat 8 datas.

JSACTR-UK commented 1 year ago

Hii, I am also having similar error.

image

Processing on the data of LC08_L2SP_145039_20191014_20200825_02_T1

For At Satellite Temperature:

:-( Error:

Traceback (most recent call last): File "C:\Users/kosis/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1955, in run temp_cal(num) File "C:\Users/kosis/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1778, in temp_cal radiance_cal(num, 't') File "C:\Users/kosis/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1426, in radiance_cal get_band_data(num, band_info[2][0], band_info[1][0], band_info[3]) File "C:\Users/kosis/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1048, in get_band_data Quality_band(num) File "C:\Users/kosis/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 981, in Quality_band dataset = gdal.Open(bq_filename, GA_ReadOnly) UnboundLocalError: local variable 'bq_filename' referenced before assignment

Process stopped in between ! You are good to go again.

Any help !!!!!

SwathiGit1 commented 5 months ago

Hi,

I too face the same error for Landsat 8 Level 1 images.

Sharing the log message below

:-( Error:

 Traceback (most recent call last):
  File "C:\Users/Swathi V/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1922, in run
    reflectance_cal(num, 's')
  File "C:\Users/Swathi V/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1494, in reflectance_cal
    get_band_data(num, band_info[2][0], band_info[1][0], band_info[3])
  File "C:\Users/Swathi V/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 1048, in get_band_data
    Quality_band(num)
  File "C:\Users/Swathi V/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 974, in Quality_band
    warp = 'gdalwarp -q -cutline "%s" -crop_to_cutline "%s" "%s"' %(shape_path, bq_filename, clipped_name)
UnboundLocalError: local variable 'bq_filename' referenced before assignment

Process stopped in between ! You are good to go again.
ivo86 commented 5 months ago

I have a similar issue: Collected all the user inputs Folder "NITK_RSGIS_20240622_115014" created in (D:/otrosDocs) directory

Extracting the file/s in the corresponding folder/s ...


Extracting LC09_L1TP_010063_20230321_20230321_02_T1.zip file in ../NITK_RSGIS_20240622_115014/Extracted/LC09_L1TP_010063_20230321_20230321_02_T1 folder.....

Time taken for extraction: 0 min. 11 sec.

Please make sure:

  1. Selected input file/s contain/s metadata file/s
        Read metadata file/s and extracted the details

:-( Error:

Traceback (most recent call last): File "C:\Users/L E N O V O/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NITK_RS-GIS_17\RSGIS_M.py", line 736, in run del num, date, pass_time, path, row, success, raw_list # Can't delete raw_metadata_del as it has nested ref UnboundLocalError: local variable 'date' referenced before assignment

Process stopped in between ! You are good to go again.