Giter VIP home page Giter VIP logo

Comments (6)

blaylockbk avatar blaylockbk commented on August 21, 2024 1

Perhaps all I need is a os.close(local_file) statement

from herbie.

blaylockbk avatar blaylockbk commented on August 21, 2024 1

I might have found a solution...use xr.load_dataset instead. This loads the data into memory and closes the file.

https://docs.xarray.dev/en/stable/generated/xarray.load_dataset.html

from herbie.

blaylockbk avatar blaylockbk commented on August 21, 2024

Hmmm, the cfgrib.open_datasets doesn't make it easy to close the file.

from herbie.

blaylockbk avatar blaylockbk commented on August 21, 2024

It was also reported that the init.py is not creating the config file.

So, is this a Windows issue or a Python 3.9 on Windows issue?

from herbie.

blaylockbk avatar blaylockbk commented on August 21, 2024

Agh, still trying to figure this out.

https://docs.python.org/3/library/os.html#os.remove
On Windows, attempting to remove a file that is in use causes an exception to be raised; on Unix, the directory entry is removed but the storage allocated to the file is not made available until the original file is no longer in use.

from herbie.

blaylockbk avatar blaylockbk commented on August 21, 2024

Oh wow. How did I miss this one...I simply forgot to close the file opened by pygrib. Well, 2785b61 seems to have fixed this one. I'll do a bit more testing, but I'm certain this is resolved.

from herbie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.