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

Cannot run tests on an Ubuntu 20.04.3 AWS server #4328

Closed
alicezou opened this issue Mar 28, 2022 · 4 comments
Closed

Cannot run tests on an Ubuntu 20.04.3 AWS server #4328

alicezou opened this issue Mar 28, 2022 · 4 comments
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."

Comments

@alicezou
Copy link
Contributor

Hi, I am trying to run tests on Ubuntu 20.04.3(an AWS server).

Problem

I am able to run

pip install -e .
pip install -e .[test]

in beets/ directory

However, when I run tox, it failes.

GLOB sdist-make: /home/ubuntu/beets/setup.py
ERROR: invocation failed (exit code 1), logfile: /home/ubuntu/beets/.tox/log/GLOB-0.log
======================================= log start ========================================
sphinx-build -b man -d _build/doctrees   . _build/man
Running Sphinx v1.8.5

Extension error:
Could not import extension sphinx.builders.latex (exception: cannot import name 'contextfunction' from 'jinja2' (/home/ubuntu/.local/lib/python3.8/site-packages/jinja2/__init__.py))
make: *** [Makefile:117: man] Error 2
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
  File "setup.py", line 52, in <module>
    build_manpages()
  File "setup.py", line 36, in build_manpages
    subprocess.check_call(['make', 'man'])
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', 'man']' returned non-zero exit status 2.

======================================== log end =========================================
ERROR: FAIL could not package project - v = InvocationError('/usr/bin/python3 setup.py sdist --formats=zip --dist-dir .tox/dist', 1)

Setup

My configuration (output of beet config) is: not relevant

@sampsyo
Copy link
Member

sampsyo commented Mar 28, 2022

Hmm; it looks like the problem is coming from running Sphinx to build the manpage that goes in the source distribution. I'm guessing that there is a partial Sphinx installation from the Debian packages (because Debian likes to "atomize" packages to install components separately).

Maybe try pip install -U sphinx to get the latest version from PyPI?

@sampsyo sampsyo added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Mar 28, 2022
@alicezou
Copy link
Contributor Author

Yes, it works (with some more errors that can be found on stackoverflow.)
BTW, can you check my pull request at #4327 ?
The integration tests as well as the local tests on AWS have passed.

@sampsyo
Copy link
Member

sampsyo commented Mar 28, 2022

Great! Leaving some notes here about how you fixed the problem might help other people in the future. 😃

It's in my queue (and hopefully that of other beets contributors as well).

@alicezou
Copy link
Contributor Author

alicezou commented Mar 28, 2022

Sure 😃
I got this error

ModuleNotFoundError: No module named 'virtualenv.seed.via_app_data'

I resolved it by

sudo apt remove --purge python3-virtualenv

from this post on stackoverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."
Projects
None yet
Development

No branches or pull requests

2 participants