retroplasma / earth-reverse-engineering

Reversing Google's 3D satellite mode
2.24k stars 214 forks source link

Error: EEXIST from mkdir when attempting to run dump_obj.js #33

Closed e-murray closed 5 years ago

e-murray commented 5 years ago

I have used this a number of times with no problems but suddenly I am getting an "EEXIST" error when attempting to run dump_obj.js. I have confirmed the file is definitely not in the folder so I am unsure why I am getting this error.

mkdir EEXIST error

disembarkedone commented 5 years ago

looks like a new version of fs-extra

the issue appears to be that it's trying to create a directory that already exists and fails

try removing the output directory

e-murray commented 5 years ago

Thanks for the reply, I thought that too but I have used fs-extra 7.0.1 before with no problems. I double checked the output directory in question "downloaded_files" is not there before running dump_obj.js but it still throws the error.

I wonder if it could be due to npm install creating the node_modules directory which dump_obj.js then attempts to create itself, causing confict? I tried a global install of fs-extra to try and sidestep the issue but it resulted in a "Cannot find module 'fs extra' " error.

I have tried re-installing node.js, installing a nuber of fs-extra versions and running cmd elevated in case it was a permissions error but the problem persists.

retroplasma commented 5 years ago

@e-murray does it work if you specify less octants? You said it was working before; maybe EEXIST occurs on Windows instead of ENAMETOOLONG somehow when the directory path becomes too long? (The name of the directory in obj is a concatenation of all octants, max level and epoch atm.)

e-murray commented 5 years ago

@retroplasma I think you are right as I then ran it on Ubuntu and got the ENAMETOOLONG error, which was solved by using a lower octant level as you say. Thanks.

JordanRO2 commented 4 years ago

This issue is caused because the path that the script is trying to create is just too long. Removing the ${OCTANTS.join('+') parameter at dump_obj.js:28 would fix it!

chris-aeviator commented 3 years ago

This issue is caused because the path that the script is trying to create is just too long. Removing the ${OCTANTS.join('+') parameter at dump_obj.js:28 would fix it!

I think this is an essential fix since why should I work with low res files when I can have high res zoom 16-20 data?

retroplasma commented 3 years ago

@chris-aeviator pushed

chris-aeviator commented 3 years ago

@retroplasma great & thanks ! :+1: