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

Fails to install: "ValueError: bad marshal data (unknown type code)" #41

Closed
LeoniePhiline opened this issue Mar 15, 2020 · 1 comment
Closed

Comments

@LeoniePhiline
Copy link

LeoniePhiline commented Mar 15, 2020

Here's what happened previously:

Pull

$ git pull
Aktualisiere d881ad2..371587e
Fast-forward
 README.md    |  61 +++++++--------------------------------------------
 aucc/main.py | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
 setup.py     |   9 ++++----
 3 files changed, 197 insertions(+), 74 deletions(-)

So I'm now on 371587e.

Build

# python3 setup.py build
running build
running build_py
running egg_info
writing avell_unofficial_control_center.egg-info/PKG-INFO
writing dependency_links to avell_unofficial_control_center.egg-info/dependency_links.txt
writing entry points to avell_unofficial_control_center.egg-info/entry_points.txt
writing requirements to avell_unofficial_control_center.egg-info/requires.txt
writing top-level names to avell_unofficial_control_center.egg-info/top_level.txt
reading manifest file 'avell_unofficial_control_center.egg-info/SOURCES.txt'
writing manifest file 'avell_unofficial_control_center.egg-info/SOURCES.txt'

Install (fails)

# python3 setup.py install
running install
running bdist_egg
running egg_info
writing avell_unofficial_control_center.egg-info/PKG-INFO
writing dependency_links to avell_unofficial_control_center.egg-info/dependency_links.txt
writing entry points to avell_unofficial_control_center.egg-info/entry_points.txt
writing requirements to avell_unofficial_control_center.egg-info/requires.txt
writing top-level names to avell_unofficial_control_center.egg-info/top_level.txt
reading manifest file 'avell_unofficial_control_center.egg-info/SOURCES.txt'
writing manifest file 'avell_unofficial_control_center.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/aucc
copying build/lib/aucc/__init__.py -> build/bdist.linux-x86_64/egg/aucc
creating build/bdist.linux-x86_64/egg/aucc/core
copying build/lib/aucc/core/__init__.py -> build/bdist.linux-x86_64/egg/aucc/core
copying build/lib/aucc/core/handler.py -> build/bdist.linux-x86_64/egg/aucc/core
creating build/bdist.linux-x86_64/egg/aucc/core/__pycache__
copying build/lib/aucc/core/__pycache__/__init__.cpython-37.pyc -> build/bdist.linux-x86_64/egg/aucc/core/__pycache__
copying build/lib/aucc/core/__pycache__/handler.cpython-37.pyc -> build/bdist.linux-x86_64/egg/aucc/core/__pycache__
copying build/lib/aucc/core/__pycache__/colors.cpython-37.pyc -> build/bdist.linux-x86_64/egg/aucc/core/__pycache__
copying build/lib/aucc/core/colors.py -> build/bdist.linux-x86_64/egg/aucc/core
creating build/bdist.linux-x86_64/egg/aucc/db
copying build/lib/aucc/db/__init__.py -> build/bdist.linux-x86_64/egg/aucc/db
creating build/bdist.linux-x86_64/egg/aucc/ui
copying build/lib/aucc/ui/__init__.py -> build/bdist.linux-x86_64/egg/aucc/ui
creating build/bdist.linux-x86_64/egg/aucc/res
creating build/bdist.linux-x86_64/egg/aucc/res/icons
copying build/lib/aucc/res/icons/tux.png -> build/bdist.linux-x86_64/egg/aucc/res/icons
creating build/bdist.linux-x86_64/egg/aucc/__pycache__
copying build/lib/aucc/__pycache__/__init__.cpython-37.pyc -> build/bdist.linux-x86_64/egg/aucc/__pycache__
creating build/bdist.linux-x86_64/egg/aucc/tests
copying build/lib/aucc/tests/main.py -> build/bdist.linux-x86_64/egg/aucc/tests
copying build/lib/aucc/main.py -> build/bdist.linux-x86_64/egg/aucc
byte-compiling build/bdist.linux-x86_64/egg/aucc/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/core/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/core/colors.py to colors.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/core/handler.py to handler.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/db/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/main.py to main.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/tests/main.py to main.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/ui/__init__.py to __init__.cpython-38.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
Traceback (most recent call last):
  File "setup.py", line 17, in <module>
    setup(
  File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib64/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/site-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/usr/lib/python3.8/site-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/lib64/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib64/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 220, in run
    os.path.join(archive_root, 'EGG-INFO'), self.zip_safe()
  File "/usr/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 273, in zip_safe
    return analyze_egg(self.bdist_dir, self.stubs)
  File "/usr/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 383, in analyze_egg
    safe = scan_module(egg_dir, base, name, stubs) and safe
  File "/usr/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 422, in scan_module
    code = marshal.load(f)
ValueError: bad marshal data (unknown type code)

Python 3.8

# python3 --version
Python 3.8.2

Any clue about ValueError: bad marshal data (unknown type code) ?

Attempts

1

I did try # find /usr -name '*.pyc' -delete and build+install again, but failed.
(Turned out this was possibly a bad idea. Don't do that! Non-root users cannot re-create pyc files so stuff will run slower for everyone. Learn from my mistake and read before you delete "cache files" that cannot all that easily be rebuilt.)

2

I tried updating setuptools: pip install -U setuptools, but rebuild+install of aucc still failed.

# pip install -U setuptools
Collecting setuptools
  Downloading setuptools-46.0.0-py3-none-any.whl (582 kB)
     |████████████████████████████████| 582 kB 1.4 MB/s 
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 44.0.0
    Uninstalling setuptools-44.0.0:
      Successfully uninstalled setuptools-44.0.0
Successfully installed setuptools-46.0.0

3

Re-check requirements - but already up to date:

# pip install -Ur requirements.txt
Requirement already up-to-date: pyusb==1.0.2 in /usr/local/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (1.0.2)
Requirement already up-to-date: elevate==0.1.3 in /usr/local/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (0.1.3)
@LeoniePhiline
Copy link
Author

LeoniePhiline commented Mar 15, 2020

Looks like pypa/setuptools#1257 (comment) gave me the right idea:

# find . -name '*.pyc'
./aucc/core/__pycache__/__init__.cpython-37.pyc
./aucc/core/__pycache__/handler.cpython-37.pyc
./aucc/core/__pycache__/colors.cpython-37.pyc
./aucc/__pycache__/__init__.cpython-37.pyc
./build/lib/aucc/core/__pycache__/__init__.cpython-37.pyc
./build/lib/aucc/core/__pycache__/handler.cpython-37.pyc
./build/lib/aucc/core/__pycache__/colors.cpython-37.pyc
./build/lib/aucc/__pycache__/__init__.cpython-37.pyc
./build/bdist.linux-x86_64/egg/aucc/core/__pycache__/__init__.cpython-37.pyc
./build/bdist.linux-x86_64/egg/aucc/core/__pycache__/handler.cpython-37.pyc
./build/bdist.linux-x86_64/egg/aucc/core/__pycache__/colors.cpython-37.pyc
./build/bdist.linux-x86_64/egg/aucc/core/__pycache__/__init__.cpython-38.pyc
./build/bdist.linux-x86_64/egg/aucc/core/__pycache__/colors.cpython-38.pyc
./build/bdist.linux-x86_64/egg/aucc/core/__pycache__/handler.cpython-38.pyc
./build/bdist.linux-x86_64/egg/aucc/db/__pycache__/__init__.cpython-38.pyc
./build/bdist.linux-x86_64/egg/aucc/ui/__pycache__/__init__.cpython-38.pyc
./build/bdist.linux-x86_64/egg/aucc/__pycache__/__init__.cpython-37.pyc
./build/bdist.linux-x86_64/egg/aucc/__pycache__/__init__.cpython-38.pyc
./build/bdist.linux-x86_64/egg/aucc/__pycache__/main.cpython-38.pyc
./build/bdist.linux-x86_64/egg/aucc/tests/__pycache__/main.cpython-38.pyc

# find . -name '*.pyc' -delete

# find . -name '*.pyc'        

# python3 setup.py build      
running build
running build_py
running egg_info
writing avell_unofficial_control_center.egg-info/PKG-INFO
writing dependency_links to avell_unofficial_control_center.egg-info/dependency_links.txt
writing entry points to avell_unofficial_control_center.egg-info/entry_points.txt
writing requirements to avell_unofficial_control_center.egg-info/requires.txt
writing top-level names to avell_unofficial_control_center.egg-info/top_level.txt
reading manifest file 'avell_unofficial_control_center.egg-info/SOURCES.txt'
writing manifest file 'avell_unofficial_control_center.egg-info/SOURCES.txt'

# python3 setup.py install    
running install
running bdist_egg
running egg_info
writing avell_unofficial_control_center.egg-info/PKG-INFO
writing dependency_links to avell_unofficial_control_center.egg-info/dependency_links.txt
writing entry points to avell_unofficial_control_center.egg-info/entry_points.txt
writing requirements to avell_unofficial_control_center.egg-info/requires.txt
writing top-level names to avell_unofficial_control_center.egg-info/top_level.txt
reading manifest file 'avell_unofficial_control_center.egg-info/SOURCES.txt'
writing manifest file 'avell_unofficial_control_center.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
byte-compiling build/bdist.linux-x86_64/egg/aucc/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/core/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/core/colors.py to colors.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/core/handler.py to handler.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/db/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/main.py to main.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/tests/main.py to main.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/aucc/ui/__init__.py to __init__.cpython-38.pyc
copying avell_unofficial_control_center.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying avell_unofficial_control_center.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/avell_unofficial_control_center-1.0.3-py3.8.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing avell_unofficial_control_center-1.0.3-py3.8.egg
Copying avell_unofficial_control_center-1.0.3-py3.8.egg to /usr/local/lib/python3.8/site-packages
Adding avell-unofficial-control-center 1.0.3 to easy-install.pth file
Installing aucc script to /usr/local/bin

Installed /usr/local/lib/python3.8/site-packages/avell_unofficial_control_center-1.0.3-py3.8.egg
Processing dependencies for avell-unofficial-control-center==1.0.3
Searching for elevate==0.1.3
Best match: elevate 0.1.3
Adding elevate 0.1.3 to easy-install.pth file

Using /usr/local/lib/python3.8/site-packages
Searching for pyusb==1.0.2
Best match: pyusb 1.0.2
Adding pyusb 1.0.2 to easy-install.pth file

Using /usr/local/lib/python3.8/site-packages
Finished processing dependencies for avell-unofficial-control-center==1.0.3

# 

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

1 participant