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

ZIP does not support timestamps before 1980 #16

Open
avoine opened this issue Mar 5, 2014 · 8 comments
Open

ZIP does not support timestamps before 1980 #16

avoine opened this issue Mar 5, 2014 · 8 comments

Comments

@avoine
Copy link
Contributor

avoine commented Mar 5, 2014

I got that error when installing your module from pypi. According to that issue:

NixOS/nixpkgs#270

There is a work aroung at least with easy_install.

Getting distribution for 'django-eztables'.
zip_safe flag not set; analyzing archive contents...
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1931, in main
with_ei_usage(lambda:
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1912, in with_ei_usage
return f()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1935, in
distclass=DistributionWithoutHelpCommands, **kw
File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 368, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 588, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 638, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1094, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 30, in run_setup
lambda: execfile(
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 72, in run
return func()
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 32, in
{'file':setup_script, 'name':'main'}
File "setup.py", line 76, in
File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 241, in run
dry_run=self.dry_run, mode=self.gen_header())
File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 538, in make_zipfile
visit(z, dirname, files)
File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 528, in visit
z.write(path, p)
File "/usr/lib/python2.7/zipfile.py", line 1045, in write
zinfo = ZipInfo(arcname, date_time)
File "/usr/lib/python2.7/zipfile.py", line 295, in init
raise ValueError('ZIP does not support timestamps before 1980')
ValueError: ZIP does not support timestamps before 1980
An error occurred when trying to install django-eztables 0.3.2. Look above this message for any errors that were output by easy_install.

@avoine
Copy link
Contributor Author

avoine commented Mar 5, 2014

I just check out pypi and your package is in the tar-gz format so that might not
be related to your package. Sorry for the noise.

@avoine
Copy link
Contributor Author

avoine commented Mar 5, 2014

So it look like the fix is trivial so I'm sending you a pull request.

@avoine avoine reopened this Mar 5, 2014
@laidbackwebsage
Copy link

This is still an issue -- do we have an ETA on when it will be fixed?

Thanks

Kevin J

@danperrout
Copy link

Having this problem aswell.

@JackNClarke
Copy link

Still an issue here as well.

@emorikawa
Copy link

For those coming in from Google on this error, it's very possible there are in fact files that have corrupt touch dates older than 1980. This raises when the mtime of a file in the packaging tree is older than 1980. This even happened for me when zip_safe was set to False

You can see if you have any of these files with: find . -mtime +13700 -ls

My fix was to touch offending files and exclude some unnecessary dirs in my Manifest.in.

See also NixOS/nixpkgs#270 and aws/aws-cli#2639

@githubtaotao
Copy link

I got a same problem when I wnat to zip a directory ,when I use debug , my direcotry can be zip ,but when I run my program , it can not work .and console write like this " The ZIP file format does not support timestamps before 1980" . I checked my directory , find some files has no modify time!! So I changed some files , like enter a line . And my program can run or debug well.

@githubtaotao
Copy link

pycharm ,odoo poject

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

6 participants