Makefile:15: recipe for target 'download' failed
Closed this issue · 3 comments
Hello Diego,
I get this error when I try to run your code (also tried the docker). Might be that some url doesn't work anymore?
Hi,
The INEGI server is responding with a content-lenght of 0, so there's not much I can do on my side. Maybe in the future the INEGI will decide to fix their website.
If you need a copy of the files you can always send me an email.
Thanks,
I think I have solved that problem with a small tweak: basically I attempt the same download multiple times, usually it success the third or fourth time.
##Download the electoral shapefiles
function download_ife {
for (( i = 1 ; i <= 32 ; i++ ))
do
while :
do
echo $i
if [ ! -f zip/$1/$i-$1.zip ];
then
$WGET $2$i -O zip/$1/$i-$1.zip
fi
if [ ! -s zip/$1/$i-$1.zip ]; then
echo "##########################################################################"
echo "Something went wrong when downloading the file. trying again"
echo "##########################################################################"
rm zip/$1/$i-$1.zip
sleep 5
else
break
fi
done
done
}
But now I hit another issue: http://gaia.inegi.org.mx/geoelectoral/datos/ECEG_$FILENUM.zip
doesn't return anything (in the file otros.sh
). They might have moved the files. I'd love if you could send me the files: francesco at bailo . sydney . edu . au
This is great, I changed the download url in the otros.sh
file and it should be working now.