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.

Hook Installation Error: ValueError: ZIP does not support timestamps before 1980

See original GitHub issue

I’m not quite sure if this is the correct place to ask about this or report this but it seems like the best place to start.

When trying to do pre-commit run --all-files I get an error when installing black (https://gist.github.com/alunduil/c10c8ea30d5e783b1f9f901edcadd184) rather than the expected successful evaluation of the defined hooks.

I’m trying to work with nix and poetry and the setup can be seen by browsing the files in https://github.com/alunduil/zfs-replicate/pull/118.

Steps that hopefully reproduce the issue:

  1. When working on that branch of zfs-replicate
  2. Ensure direnv has run: direnv reload (requires nix but should not require anything else)
  3. Run pre-commit run --all-files

Potentially related but I can’t tell. When I’m working in two different Python projects I notice that pre-commit wants to re-use the same environment even though the package sets and Python interpreters might be drastically different. Is there anyway to have pre-commit cache somewhere that’s project specific to avoid different projects causing cache collisions?

Let me know if anything is missing (I’m sure I’ve overlooked some details).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
asottilecommented, Oct 25, 2020

Cloning black and setting up a minimal nix-shell environment with envrc does indeed reproduce this

given this isn’t a problem with pre-commit then => closing

1reaction
asottilecommented, Oct 25, 2020

do you know why you have SOURCE_DATE_EPOCH=1? that’s what’s breaking the zip module

unset that!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Error as "ValueError: Zip does not support timestamps ...
So I downloaded the setuptools-scm packages and I tried to install it but I am getting an error ValueError: Zip does not support...
Read more >
ZIP does not support timestamps before 1980 - CircleCI Discuss
This causes python's easy_zip to choke and throw the error when you go to create a deployment zip file.
Read more >
Issue 34097: ZIP does not support timestamps before 1980
The ZIP format cannot handle times before 1980. Issue6090 provided a nice error message for trying to add such files. I'm seeing a...
Read more >
Using pip in a nix-shell: SOURCE_DATE_EPOCH not helping
ValueError : ZIP does not support timestamps before 1980 WARNING: You are using pip version 21.1.3; however, version 21.3.1 is available.
Read more >
'python3.8 setup.py install' gets 'ZIP does not support ...
... 6.9 'ValueError: ZIP does not support timestamps before 1980' ... package built from the downloaded code fails as described above.
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