question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suppressing ZipFile duplication warning

See original GitHub issue

Python’s ZipFile allows writing duplicate files and does this by default. When it writes a duplicate file, it raises a UserWarning. This occurs for each file and is a bit noisy. As there doesn’t seem to be a standard way of solving this, would recommend that we simply suppress this warning. Combining this with a resolution to issue ( https://github.com/alimanfoo/zarr/issues/128 ), would ensure that deduplication already occurs so the warning is no longer relevant.

Edit: Added link to Python bug after the fact.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
alimanfoocommented, Feb 27, 2017

Maybe this could be a method on the DirectoryStore class? Called to_zipfile() or archive() or something like that?

On Mon, 27 Feb 2017 at 21:06, jakirkham notifications@github.com wrote:

I added a little bit of Python code to zip up the directories after they are written to in such a way as to ensure Zarr can still load them. This is a good enough near term solution for my needs. Would be willing to contribute the utility function or perhaps add another store if there is interest.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/alimanfoo/zarr/issues/129#issuecomment-282853137, or mute the thread https://github.com/notifications/unsubscribe-auth/AAq8QnxgiJ9GUE_-gKGl5qvisU50KuDlks5rgzq7gaJpZM4MLhEG .

– Alistair Miles Head of Epidemiological Informatics Centre for Genomics and Global Health http://cggh.org The Wellcome Trust Centre for Human Genetics Roosevelt Drive Oxford OX3 7BN United Kingdom Email: alimanfoo@googlemail.com Web: http://purl.org/net/aliman Twitter: https://twitter.com/alimanfoo Tel: +44 (0)1865 287721

0reactions
alimanfoocommented, Oct 18, 2017

Thanks, sounds good.

On Wed, 18 Oct 2017 at 19:14, jakirkham notifications@github.com wrote:

Forgot to mention that create_group, create_dataset, and open_group will add an empty .zattrs entry to start with. Thus if the attributes need to be set or modified afterwards, this will create duplicate .zattrs entries in a Zip file. Have raised issue ( #121 https://github.com/alimanfoo/zarr/issues/121 ) to allow attrs to be specified in these creation functions.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/alimanfoo/zarr/issues/129#issuecomment-337680666, or mute the thread https://github.com/notifications/unsubscribe-auth/AAq8Qt1uUqohGRrcK2lmeXzPbjF5uB6qks5stj_ogaJpZM4MLhEG .

– Alistair Miles Head of Epidemiological Informatics Centre for Genomics and Global Health http://cggh.org Big Data Institute Building Old Road Campus Roosevelt Drive Oxford OX3 7LF United Kingdom Phone: +44 (0)1865 743596 Email: alimanfoo@googlemail.com Web: http://a http://purl.org/net/alimanlimanfoo.github.io/ Twitter: https://twitter.com/alimanfoo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suppressing ZipFile duplication warning · Issue #129 - GitHub
When it writes a duplicate file, it raises a UserWarning . This occurs for each file and is a bit noisy.
Read more >
python zip file hit userwarning: Duplicate name - Stack Overflow
The duplicate name warning comes from the input directory files, of the same name, all being written to the same place of the...
Read more >
Issue 2824: zipfile to handle duplicate files in archive
Once a duplicate is in the zip file, it is maintained in the listing of files, but deleting one of the entries using...
Read more >
A complete guide for working with I/O streams and zip ...
The extracted archive may not have visible duplicate files, but the underlying file pointer might have duplicated information. Type zipfile list ...
Read more >
Powershell - unzipping duplicate content into separate folder
I have a task of unzipping over 5k zipped files. The following command does this, however some of the zipped files have duplicate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found