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

Can't install browse on Mac #773

Open
qkral opened this issue Oct 19, 2024 · 0 comments
Open

Can't install browse on Mac #773

qkral opened this issue Oct 19, 2024 · 0 comments
Labels

Comments

@qkral
Copy link

qkral commented Oct 19, 2024

Describe the bug
I'm trying to install arxiv/browse on my Mac to push a new PR for summarizepaper.com but I can't install it either with the standard method or with Docker.

If I follow the method

python -m venv ./venv
source ./venv/bin/activate
pip install poetry==1.3.2
poetry install
python main.py

but when I run poetry install it writes:
b'HEAD'

and when I run python main.py I get:
Traceback (most recent call last):
File "/Users/qkral/Desktop/github/arxivsum/arxiv-browse-develop/main.py", line 5, in
from browse.factory import create_web_app
File "/Users/qkral/Desktop/github/arxivsum/arxiv-browse-develop/browse/factory.py", line 9, in
from arxiv.base import Base
File "/usr/local/lib/python3.11/site-packages/arxiv/base/init.py", line 33, in
from . import exceptions, urls, alerts, context_processors, filters
File "/usr/local/lib/python3.11/site-packages/arxiv/base/urls/init.py", line 74, in
from .links import urlize, urlizer, url_for_doi
File "/usr/local/lib/python3.11/site-packages/arxiv/base/urls/links.py", line 43, in
import bleach
File "/usr/local/lib/python3.11/site-packages/bleach/init.py", line 7, in
from bleach.linkifier import (
File "/usr/local/lib/python3.11/site-packages/bleach/linkifier.py", line 6, in
from bleach import html5lib_shim
File "/usr/local/lib/python3.11/site-packages/bleach/html5lib_shim.py", line 14, in
from bleach._vendor.html5lib import (
File "/usr/local/lib/python3.11/site-packages/bleach/_vendor/html5lib/init.py", line 25, in
from .html5parser import HTMLParser, parse, parseFragment
File "/usr/local/lib/python3.11/site-packages/bleach/_vendor/html5lib/html5parser.py", line 8, in
from . import _tokenizer
File "/usr/local/lib/python3.11/site-packages/bleach/_vendor/html5lib/_tokenizer.py", line 16, in
from ._trie import Trie
File "/usr/local/lib/python3.11/site-packages/bleach/_vendor/html5lib/_trie/init.py", line 3, in
from .py import Trie as PyTrie
File "/usr/local/lib/python3.11/site-packages/bleach/_vendor/html5lib/_trie/py.py", line 6, in
from ._base import Trie as ABCTrie
File "/usr/local/lib/python3.11/site-packages/bleach/_vendor/html5lib/_trie/_base.py", line 3, in
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/local/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/collections/init.py)

there is no python3.11-dev version on Mac which may be the problem?

So I ended up running it with Docker which should work like a charm but...

For Docker I end up with this error:

=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:03c4ab7fed1cd772cc1c3e37a326e684980fbc86efcc1c6d382ba0150ef0635d 0.0s
=> => naming to docker.io/arxiv/browse 0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them

  • docker run -it --publish 8080:8080 arxiv/browse
    [2024-10-19 19:15:54 +0000] [1] [INFO] Starting gunicorn 23.0.0
    [2024-10-19 19:15:54 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
    [2024-10-19 19:15:54 +0000] [1] [INFO] Using worker: gthread
    [2024-10-19 19:15:54 +0000] [7] [INFO] Booting worker with pid: 7
    [2024-10-19 19:15:54 +0000] [8] [INFO] Booting worker with pid: 8
    [2024-10-19 19:15:54 +0000] [9] [INFO] Booting worker with pid: 9
    [2024-10-19 19:15:54 +0000] [10] [INFO] Booting worker with pid: 10
    [2024-10-19 19:15:55 +0000] [8] [ERROR] Exception in worker process
    Traceback (most recent call last):
    File "/opt/venv/lib/python3.11/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker
    worker.init_process()
    File "/opt/venv/lib/python3.11/site-packages/gunicorn/workers/gthread.py", line 94, in init_process
    super().init_process()
    File "/opt/venv/lib/python3.11/site-packages/gunicorn/workers/base.py", line 135, in init_process
    self.load_wsgi()
    File "/opt/venv/lib/python3.11/site-packages/gunicorn/workers/base.py", line 147, in load_wsgi
    self.wsgi = self.app.wsgi()
    ^^^^^^^^^^^^^^^
    File "/opt/venv/lib/python3.11/site-packages/gunicorn/app/base.py", line 66, in wsgi
    self.callable = self.load()
    ^^^^^^^^^^^
    File "/opt/venv/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 57, in load
    return self.load_wsgiapp()
    ^^^^^^^^^^^^^^^^^^^
    File "/opt/venv/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp
    return util.import_app(self.app_uri)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/venv/lib/python3.11/site-packages/gunicorn/util.py", line 370, in import_app
    mod = importlib.import_module(module)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "", line 1204, in _gcd_import
    File "", line 1176, in _find_and_load
    File "", line 1147, in _find_and_load_unlocked
    File "", line 690, in _load_unlocked
    File "", line 940, in exec_module
    File "", line 241, in _call_with_frames_removed
    File "/app/browse/factory.py", line 26, in
    s3 = FlaskS3()
    ^^^^^^^
    NameError: name 'FlaskS3' is not defined

I tried to pip install flask-s3 but it didn't change anything.

Some help please.

@qkral qkral added the bug label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant