-
Notifications
You must be signed in to change notification settings - Fork 7
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
OSError: Unable to synchronously open file (file signature not found) #96
Comments
It is partially solved. After numerous re-runs i realized it doesn't give me the error for the same .h5 file each run. I tried extracting data for a small country that consisted of 6 tiles, which worked (as i am getting this error for a 17 tile territory). For an hour or so i re-ran my code and eventually it worked. Maybe the problem is in the httpx timeout parameters i am not really sure at this point. |
I have the same issue |
Hi, I had this issue when I was in Istanbul as well. I think it is somehow connected to your internet speed, like there is a sweet spot where you can download files. I solved it using vpns to control my download speed. Although I am in italy i still get this error 8/10 of every run. I am considering copying and pasting this library to my local and adjusting the h5py read timeout values. |
@ashbate Hi, thanks for your message. Indeed, I am in Istanbul but I use different networks to test this tool. Some of them are literally high speed and through UNDP (enhanced and unrestricted so to say). I will do some more experimentation today and see if I can download another area of interest. The files get downloaded, but they have 0 KB after. Something in the subsequent step seems to go wrong. |
@Skerre Hi, i solved it. Basically downloaded the library's files and ran it locally with adding
hope it will work for you too. If not try tweaking the timeout value. |
@ashbate Dear ashbate, thank you for the effort of resolving this. However, I tried your solution and it did not work yet. I added the timeout to the beginning of the script (also tried other places, within the functions) and literally replaced my _download function with yours. It does not really seem to make a timeout and goes into the same error as before. |
@ashbate I can share more details on what I am doing if you want |
@Skerre Hi skerre, can you check your linkedin please? |
@ashbate I had the same issue and partially solved it with your modification. In my case, I included donwload options in bm_extract like 'output_directory' and 'output_skip_if_exists=False'. This consumes some of your storage, but it completely works. This information is those who faces the same issue. |
I'm facing the same issue. I have followed @ashbate and @koichisato-dev 's modifications, but still issue is not solved in my case. However, I found another possible cause of problem in their starter guideline page (2nd step):
I have checked profile information and bearer status (How to check if it is working or not with this bearer token ?) according to above guideline, but still problem is not solved. Thank you beforehand. |
@Abdulazizbek I cannot see your current code, so I am not sure why the error is occurring, but I suspect you might not have set up your .env file correctly or loaded your token properly. Could you try the following code? [setting in key.env]
|
@koichisato-dev Thank you for your explanation. I have checked with your provided code and my token is working properly (expiry date is normal). But, still getting some issues like below: I'm not sure where is going wrong. If someone handled codes successfully, source code would be helpful. |
@Abdulazizbek I see now your error messsage is 'No such file or directory', so I guess your error message changed from 'OSError: Unable to synchronously open file' to 'No such file or directory'. Is my guess correct? I just want to clarify your situation. |
@koichisato-dev Yes sure |
@Abdulazizbek If that's the case, the 'output_directory' path in bm_extract is incorrect. Please ensure you specify the correct path. |
@koichisato-dev While it took too long to overcome an issue, I have double checked every parameters and I have checked images saved in 'output_directory' |
@Abdulazizbek okay, great! Then, continue the tutorial |
Bug Report
Description
When bm.extract() or bm.raster() methods are used, it can not generate the data.
Reproducibility
Steps to Reproduce
Calling the methods on jupyter notebook produces this error. I tried both on my computer and google colab. It looks like it is an OS error related to h5py
Environment
Additional Context
Possible Fix
Initially i moved the project folder to the desktop for possible read&write permission issues. It worked the first run then the error persisted.
The text was updated successfully, but these errors were encountered: