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

Download and calibrate latest radar reflectivity (dBZ) composite fails #39

Open
JaniKallankari opened this issue Jun 27, 2023 · 2 comments

Comments

@JaniKallankari
Copy link

I'm trying to run example code under paragrhap Download and calibrate latest radar reflectivity (dBZ) composite.

Command composite.download() fails with following error message:

Traceback (most recent call last):
  File "rasterio\_base.pyx", line 310, in rasterio._base.DatasetBase.__init__
  File "rasterio\_base.pyx", line 221, in rasterio._base.open_dataset
  File "rasterio\_err.pyx", line 221, in rasterio._err.exc_wrap_pointer
rasterio._err.CPLE_OpenFailedError: C:/Users/xxxx/AppData/Local/Temp/tmp42opk8v9: file used by other process

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    composite.download()
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\fmiopendata\radar.py", line 77, in download
    img = rasterio.open(fid.name)
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\rasterio\env.py", line 451, in wrapper
    return f(*args, **kwds)
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\rasterio\__init__.py", line 320, in open
    dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)
  File "rasterio\_base.pyx", line 312, in rasterio._base.DatasetBase.__init__
rasterio.errors.RasterioIOError: C:/Users/xxxx/AppData/Local/Temp/tmp42opk8v9: file used by other process

Any ideas why example code is not working. I'm running Windows 10 and pyhthon 3.11.

@pnuu
Copy link
Owner

pnuu commented Aug 11, 2023

Sorry for the very late answer. This could be something with how Windows handles files. I've seen something similar in other Python libraries where they have to do workarounds for Windows file handling. I should perhaps add automated Windows tests, but might not be able to solve the problems without an actual access to a Windows machine.

@jaakkolehtinen
Copy link

Bump, I have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants