scan_module(): ValueError: bad marshal data (unknown type code)
See original GitHub issueThis 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.
Issue Analytics
- State:
- Created 6 years ago
- Comments:26 (12 by maintainers)
Top Results From Across the Web
How to fix Python ValueError:bad marshal data?
In my case I was using awscli on Debian 9 and the error was "ValueError: bad marshal data (set size out of range)"....
Read more >1207572 – [abrt] yum: config.py:27:<module>:ValueError: bad ...
Bug 1207572 - [abrt] yum: config.py:27:<module>:ValueError: bad marshal data (unknown type code). Summary: [abrt] yum: config.py:27:<module>:ValueError: bad ...
Read more >Solved: Desktop error when importing python package
<pi>ValueError: bad marshal data (unknown type code) </pi> Details: DataSourceKind=Python DataSourcePath=Python Message=Python script error.
Read more >ValueError: bad marshal data (unknown type code)
I'm running weewx version 4.5.1, using Python 3.7.3, platform Linux-5.10.11-v7l+-armv7l-with-debian-10.8 and locale is 'nb_NO.UTF-8'.
Read more >ValueError: bad marshal data (unknown type code) - Installation
EDIT i reformatted SD card as apt-get threw errors so I can't diagnose this anymore. I just attempted an upgrade from 0.62.1 to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@benoit-pierre: Thank! Updating setuptools in Travis fixes the problem.
The first version that implemented PEP 552 was v3.7.0a4. But setuptools currently does: