setuptools: scan_module(): ValueError: bad marshal data (unknown type code)
This happens with CPython from git master (e768c86ef442ef89004089a8a34ce5909ffb90f2):
Traceback (most recent call last):
File "setup.py", line 16, in <module>
install_requires=["appdirs"],
File ".../python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File ".../python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File ".../python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File ".../python3.7/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File ".../python3.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File ".../python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File ".../python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File ".../python3.7/site-packages/setuptools/command/bdist_egg.py", line 209, in run
os.path.join(archive_root, 'EGG-INFO'), self.zip_safe()
File ".../python3.7/site-packages/setuptools/command/bdist_egg.py", line 245, in zip_safe
return analyze_egg(self.bdist_dir, self.stubs)
File ".../python3.7/site-packages/setuptools/command/bdist_egg.py", line 355, in analyze_egg
safe = scan_module(egg_dir, base, name, stubs) and safe
File ".../python3.7/site-packages/setuptools/command/bdist_egg.py", line 392, in scan_module
code = marshal.load(f)
ValueError: bad marshal data (unknown type code)
I believe this is because PEP 552 has been implemented, which adds extra 4 bytes to the .pyc header; but setuptools is not aware of that yet.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 26 (12 by maintainers)
Links to this issue
Commits related to this issue
- Update .travis.yml Fix nigthly failing see https://github.com/pypa/setuptools/issues/1257 — committed to mgasystem/giraumon by kryskool 6 years ago
- Install newest setuptools to pass tests on Py3.7 https://github.com/pypa/setuptools/issues/1257 — committed to miso-belica/sumy by miso-belica 6 years ago
- update setuptools on Travis setuptools on Travis doesn't support Python 3.7 yet see https://github.com/pypa/setuptools/issues/1257 — committed to peterjc/backports.lzma by deleted user 6 years ago
- Need newer version of setuptools for Python 3.7 ref: https://travis-ci.org/pygridtools/drmaa-python/jobs/409174795 xref: https://github.com/pypa/setuptools/issues/1257 — committed to jakirkham/drmaa-python by jakirkham 6 years ago
- Update setuptools on travis. Because of https://github.com/travis-ci/travis-ci/issues/9181 resp. https://github.com/pypa/setuptools/issues/1257 — committed to AKSW/QuitStore by white-gecko 6 years ago
- Need newer version of setuptools for Python 3.7 ref: https://travis-ci.org/pygridtools/drmaa-python/jobs/409174795 xref: https://github.com/pypa/setuptools/issues/1257 — committed to jakirkham/drmaa-python by jakirkham 6 years ago
@benoit-pierre: Thank! Updating setuptools in Travis fixes the problem.
@benoit-pierre: How to repeat:
The first version that implemented PEP 552 was v3.7.0a4. But setuptools currently does:
@smagafurov: just to be clear, to fix your issues you should:
I’m not sure it make sense to explicitely test for 3.7.0a4: if you’re running with nightly, then problems are to be expected, and you’re also expected to keep current, no?
What I don’t understand is why it fails on Travis, or is it another hole in our testsuite?