chrisvwn / Rnightlights

R package to extract data from satellite nightlights.
GNU General Public License v3.0
47 stars 14 forks source link

Error message after reinstalling R #30

Closed nreguera closed 5 years ago

nreguera commented 5 years ago

Hi Chris:

I am having troubles with my S.O. and I have been reinstalling R Studio several times. Now when I try to restart the NightLights downloads where I left them, I got the following error message:

Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer",  : 
  Cannot create a RasterLayer object from this file. (file does not exist)

Any idea?

Thanks.

Natxo.

nreguera commented 5 years ago

A screenshot just in case helps:

screenshot

The data I am trying to download is the one that relates to year 2016 month 12.

chrisvwn commented 5 years ago

Hi Natxo,

Looks like the download did not complete. So what happens if the download is interrupted and the package thinks it completed it will decompress it and end up with an invalid raster but the package still thinks it is okay so it will not resume the download the next time.

In this case, try deleting the tile and trying again.

Chris

nreguera commented 5 years ago

I already tried that, I remove the tiles in the tiles folder, and checked that no other reference is in other folder (i.e. outputrasters,...)

chrisvwn commented 5 years ago

Hmm. That's strange. Are you using aria2 to download? Are you getting an error when downloading?

nreguera commented 5 years ago

Sorry Chris! My mistake, I created a PATH environmental variable in my user variables instead of using the one already that exists in the system variables. So I deleted the aria2 folder location in the first and added in the system and now looks it's working again.

Thanks!

nreguera commented 5 years ago

Sorry Chris! My mistake, I created a PATH environmental variable for aria2 in my user variables instead of using the one that already exists in the system variables. So I deleted the aria2 folder location in the first and added in the system and now looks it's working again.

Thanks!