Code Monkey home page Code Monkey logo

Comments (7)

byersiiasa avatar byersiiasa commented on May 29, 2024 1

fixed!

from message_ix.

gidden avatar gidden commented on May 29, 2024

I think this can be closed now, @byersiiasa can you confirm please?

from message_ix.

Jihoon avatar Jihoon commented on May 29, 2024

I also saw this. I am just ignoring it for now.

from message_ix.

byersiiasa avatar byersiiasa commented on May 29, 2024

@gidden Just tried this again, still happening.
Error occurs regardless of using command prompt or anaconda prompt.

NB: Files downloaded correctly to the folder nonetheless. I will note on the installation instructions to ignore the issue for now.

from message_ix.

khaeru avatar khaeru commented on May 29, 2024

This is probably because archive.close() is not called before shutil.rmtree(tmp) in do_dl():

archive = zipfile.ZipFile(dst)
logger().info('Unzipping {} to {}'.format(dst, tmp))
archive.extractall(tmp)
if not os.path.exists(local_path):
os.makedirs(local_path)
cpfrom = '{}/message_ix-{}/{}'.format(tmp, branch or tag, repo_path)
cpto = '{}/{}'.format(local_path, repo_path)
logger().info('Copying {} to {}'.format(cpfrom, cpto))
recursive_copy(cpfrom, cpto, overwrite=True)
shutil.rmtree(tmp)

From the Python docs:

You must call close() before exiting your program or essential records will not be written.

…makes it seem like the file handle for master.zip will not be released until that call is made. ZipFile.open() can also be used as a context manager, which will do this automatically.

from message_ix.

gidden avatar gidden commented on May 29, 2024

from message_ix.

khaeru avatar khaeru commented on May 29, 2024

@byersiiasa I believe I fixed this via #256; the .close() call is now included:

# Close *zipfile* so it can be deleted with *td*
archive.close()

Can you please test when you've a spare moment, and confirm by closing this issue?

from message_ix.

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.