carlos-alberto-silva / rGEDI

rGEDI: An R Package for NASA's Global Ecosystem Dynamics Investigation (GEDI) Data Visualization and Processing.
164 stars 66 forks source link

h5 files not closing #31

Closed kjfuller06 closed 3 years ago

kjfuller06 commented 3 years ago

After using the readLevel1B function, there is no way to delete the h5 file until RStudio is terminated. I've tried the following functions to get the file to unlink so it can be deleted but nothing works:

file$close_all()
h5closeAll()
H5close(file)

I have also cycled all stored objects in my environment through the above closing functions to try to find the culprit, as well as running rm(list = ls()), but no luck. When I use h5listIdentifier() it does not return any open h5 files:

[1] type name
<0 rows> (or 0-length row.names)

However, I do not have these issues when I run through examples with the hdf5r packages or the Bioconductor package rhdf5. Any idea what's going on?

caiohamamura commented 3 years ago

Check the examples for the functions, you should use close(file).

Em seg., 19 de abr. de 2021 às 18:12, kjfuller06 @.***> escreveu:

After using the readLevel1B function, there is no way to delete the h5 file until RStudio is terminated. I've tried the following functions to get the file to unlink so it can be deleted but nothing works:

file$close_all() h5closeAll() H5close(file)

When I use h5listIdentifier() it does not return any open h5 files:

[1] type name

<0 rows> (or 0-length row.names) However, I do not have these issues when I run through examples with the hdf5r packages or the Bioconductor package rhdf5. Any idea what's going on? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub , or unsubscribe .
kjfuller06 commented 3 years ago

Ugh of course. Thanks, I'll try that from the office tomorrow.

kjfuller06 commented 3 years ago

Works perfectly now, obviously. Thanks for the quick response!