I don't know why, but the same data can be run by two cities, and if one city runs Rios alone, and I keep reporting it wrong

What is the issue or question you have?

What do you expect to happen?

What have you tried so far?

Attach the logfile here:

natcap.rios-log-2023-04-09–17_19_17.txt (112.1 KB)

Hi @nishang1 -

The end of the log file says this:

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.rios\build\rios\out00-PYZ.pyz\pygeoprocessing.geoprocessing", line 95, in get_nodata_from_uri
AttributeError: 'NoneType' object has no attribute 'GetRasterBand'

That AttributeError isn’t very helpful, but the previous line looks like it’s trying to read the NoData value from one of your input rasters and having a problem with it. I’m not sure if this is the problem, but I do know that historically our models have required that all rasters have the NoData value defined. So please check to make sure that all of the raster input layers have NoData values defined, define any that aren’t, and see if that helps.

~ Stacie

1 Like

For what it’s worth, this error is GDAL-speak for “cannot open the raster”. Usually this means the raster does not exist at the given filepath. But it’s not very helpful since the error does not include the path that it was trying to open.

@swolny @dave However, I am more puzzled that it is the same data, I just cut out a small market, and it reported such an error.

@nishang1 can you explain more about what process you did to “cut out a small market”?

~ Stacie

Because the research needs the whole northern Shaanxi that I studied at the beginning, later I found that the result data always appeared white squares, so I chose arcgis to directly cut the previous grid data of northern Shaanxi. Cut into Yan’an City and Yulin City, but I don’t know why it keeps reporting errors when running in Rios software. Later, I chose to redo all the data of the two cities in arcgis, and then run it in Rios, but I still reported the same error. Now the previous data can’t run, and I feel that it may be a software problem.
natcap.rios-log-2023-04-11–22_18_22.txt (282.5 KB)

Do the areas that you cut out contain the land use/land cover codes where the activities are allowed to be done? I wonder if there are activities where there are no available pixels within the city areas because the land use/land cover codes associated with those activities are not present.

For example, if the activity “Cultivation + management of forest resources” can only happen on pixels where the land use is currently “cultivation”, are there any “cultivation” pixels in the cities? If not, then the model can’t process that activity correctly. And perhaps instead of giving a useful error telling you that there are no pixels available to do that activity on, this old model is giving a cryptic error instead. Looking at the log file, “Cultivation + management of forest resources” is the activity that the model was processing when it gave the error.

I will be out of the office until 24 April, so will not be able to help with this for a while. So please look closely at your city inputs for the activity<->land use mismatch that I just described. If this is not an issue, then look closely at what is different with your inputs between the case where you run the whole area versus run only with the cities. Let us know what you find.

~ Stacie

@swolny I just remove the plus sign between forest resource management and tending in excel to calculate forest resource management, but animal and plant protection, according to you, I do it in all woodlands and grasslands, which is present in land use data. But I kept reporting an error.


natcap.rios-log-2023-04-12–21_06_15.txt (68.5 KB)

Right before the error, there is this message:
activity_name Animal and plant protection allowed lu codes: set([])

Compare that with a previous message:
activity_name management of forest resources allowed lu codes: set([24, 21, 22, 23])

This indicates that there are no land use codes where “Animal and plant protection” are allowed to be done. (In comparison, “management of forest resources” can be done on land use codes 24, 21, 22 and 23). So please either update the inputs to allow “Animal and plant protection” to be done on land use codes within your area of interest; or remove this activity, if it cannot actually be done within the area of interest.

~ Stacie

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.