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

FileNotFoundError: xxx/massradiusEarthlikeRocky.txt not found. #242

Open
stefsmeets opened this issue Oct 29, 2024 · 10 comments
Open

FileNotFoundError: xxx/massradiusEarthlikeRocky.txt not found. #242

stefsmeets opened this issue Oct 29, 2024 · 10 comments
Labels
JOSS publication: PROTEUS TBD before PROTEUS JOSS publication Priority 3: standard Priority level 3: medium time criticality or importance software Relating to software and implementation

Comments

@stefsmeets
Copy link
Contributor

Hi all, #220 changes something and now the dummy input fails with:
FileNotFoundError: /home/stef/python/proteus/fwl_data/mass_radius/Mass-radius/Zeng2019/massradiusEarthlikeRocky.txt not found.

I seem to be missing some file, but it is unclear to me how I can get it.

@stefsmeets
Copy link
Contributor Author

Seems like I need to run proteus get reference, but it says that the data already exists:

$ find . -name '*massradius*'
./fwl_data/mass_radius/Mass-radius/Zeng2019/massradius_50percentH2O_1000K_1mbar.txt
./fwl_data/mass_radius/Mass-radius/Zeng2019/massradius_50percentH2O_500K_1mbar.txt
./fwl_data/mass_radius/Mass-radius/Zeng2019/massradius_100percentH2O_500K_1mbar.txt
./fwl_data/mass_radius/Mass-radius/Zeng2019/massradiusFe.txt
./fwl_data/mass_radius/Mass-radius/Zeng2019/massradius_50percentH2O_300K_1mbar.txt
./fwl_data/mass_radius/Mass-radius/Zeng2019/massradius_100percentH2O_300K_1mbar.txt
./fwl_data/mass_radius/Mass-radius/Zeng2019/massradius_100percentH2O_700K_1mbar.txt
./fwl_data/mass_radius/Mass-radius/Zeng2019/massradiushydrogen.txt
./fwl_data/mass_radius/Mass-radius/Zeng2019/massradiusMaxCollisionStripping.txt
./fwl_data/mass_radius/Mass-radius/Zeng2019/massradiusmgsio3.txt

@stefsmeets
Copy link
Contributor Author

stefsmeets commented Oct 29, 2024

I removed the mass_radius directory and ran proteus get reference again. It works again now.

Seems like the download command only checks for the presence of the directory. This seems like an oversight, especially because it fails silently and it isn't documented.

@nichollsh
Copy link
Contributor

Is this true for all of the download commands then? Or just this one?

@stefsmeets
Copy link
Contributor Author

I don't know, I didn't look at the other ones.

@stefsmeets
Copy link
Contributor Author

Oof, there is a lot of room for refactoring the proteus.utils.data module. All download functions check for the existance of the directory, and skips downloading if the directory exists. If any of the files inside the directory are updated, then these will not be downloaded.

However, checking for every file is also extremely slow. And I believe OSF does not have something like a file index to check against, you must check file-by-file which is a performance killer.

@nichollsh
Copy link
Contributor

It might be possible to get this information using the API?
e.g. curl -X "GET" https://api.osf.io/v2/nodes/fzwr4/files/osfstorage/

@nichollsh
Copy link
Contributor

nichollsh commented Oct 29, 2024

Actually, this can be done with the osf library that we are already using: here

bash> osf -p fzwr4 list

@nichollsh
Copy link
Contributor

And one other thing: while working on this, it might be a good time to address #206.

@stefsmeets
Copy link
Contributor Author

@lsoucasse I don't believe this was fixed. #206 is not a duplicate of this issue.

@stefsmeets stefsmeets reopened this Nov 11, 2024
@lsoucasse
Copy link
Member

@lsoucasse I don't believe this was fixed. #206 is not a duplicate of this issue.

Sorry, thought PR #244 fully addressed it.

@lsoucasse lsoucasse added the software Relating to software and implementation label Nov 11, 2024
@timlichtenberg timlichtenberg added Priority 3: standard Priority level 3: medium time criticality or importance JOSS publication: PROTEUS TBD before PROTEUS JOSS publication labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JOSS publication: PROTEUS TBD before PROTEUS JOSS publication Priority 3: standard Priority level 3: medium time criticality or importance software Relating to software and implementation
Projects
Status: Next up
Development

No branches or pull requests

4 participants