Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors during extraction of datafiles (tar directory targets) #5

Open
euronion opened this issue May 6, 2020 · 2 comments
Open

Errors during extraction of datafiles (tar directory targets) #5

euronion opened this issue May 6, 2020 · 2 comments

Comments

@euronion
Copy link

euronion commented May 6, 2020

During rasterisation a lot of files where in the wrong location or were not unzip-ped / un-tar-ed correctly.

I had a few unsuccesfull runs of rasterize_datasets(cleanup=:limited) and download_datasets(). Maybe that caused the problem?

The affected files and directories I had to manually cleanup were:

  • unzip NUTS.zip
  • renaming of the WDPA files rename 's/^WDPA_Apr2020/WDPA/' WDPA_*
  • create the temp_ssp2 folder and populate it
  • mv GlobalEnergyGIS/ETOPO1_Ice_c_geotiff/ETOPO1_Ice_c_geotiff.tif GlobalEnergyGIS/ETOPO1_Ice_c_geotiff.tif
  • unzip timezones-with-oceans.shapefile.zip into timezones-with-oceans.shapefile
@niclasmattsson
Copy link
Owner

I just completed a fresh install on a Windows laptop. The download and rasterization took several hours on this slow and low-memory machine, but it completed and cleaned up without the problems you had. But I'll leave this issue open until I get the chance to test a Linux box as well.

I do appreciate the reports though. Please keep them coming if you have more problems, but I hope things become smoother for you from now on.

@euronion
Copy link
Author

I did a clean install and tried to download the datafiles again.
It works up to the step where it tries to unpack the tar file temp_ssp2.tar and fails with the following error:

Unpacking archive: temp_ssp2.tar
tar: /home/<usr>/share/GlobalEnergyGIS/temp_ssp2: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
ERROR: failed process: Process(`tar xf /home/<usr>/share/GlobalEnergyGIS/temp_ssp2.tar --directory=/home/<usr>/share/GlobalEnergyGIS/temp_ssp2`, ProcessExited(2)) [2]

Stacktrace:
 [1] pipeline_error at ./process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool) at ./process.jl:440
 [3] run at ./process.jl:438 [inlined]
 [4] unpack(::String, ::String, ::String) at /home/<usr>/.julia/packages/GlobalEnergyGIS/gFPzK/src/downloaddatasets.jl:146
 [5] download_datasets(::Int64) at /home/<usr>/.julia/packages/GlobalEnergyGIS/gFPzK/src/downloaddatasets.jl:75
 [6] download_datasets() at /home/<usr>/.julia/packages/GlobalEnergyGIS/gFPzK/src/downloaddatasets.jl:6
 [7] top-level scope at REPL[1]:1

It seems as if the directory temp_ssp2 is not created before trying to extract the tar archive. In the background BinDeps is relying on 7z for Windows and the tar command for Linux. Both behave differently on output directories, i.e. I think you need to create all directories where you want to untar tar archives to first.

@euronion euronion changed the title Errors during rasterisation due to misplaced files. Errors during extraction of datafiles (tar directory targets) May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants