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

BeautifulSoup:4.5.3 raising AttributeError. #101

Open
anton-shablyko opened this issue Nov 5, 2022 · 0 comments
Open

BeautifulSoup:4.5.3 raising AttributeError. #101

anton-shablyko opened this issue Nov 5, 2022 · 0 comments

Comments

@anton-shablyko
Copy link

anton-shablyko commented Nov 5, 2022

It looks like an older version of BeautifulSoup causing the application to crash with the following error

 * Running on http://127.0.0.1:5000
INFO:werkzeug:Press CTRL+C to quit
ERROR:apod.utility:module 'collections' has no attribute 'Callable'
ERROR:application:Internal Service Error :<class 'Exception'> msg:module 'collections' has no attribute 'Callable'
ERROR:application:Service Exception. Msg: <class 'TypeError'>
INFO:werkzeug:127.0.0.1 - - [04/Nov/2022 17:03:02] "GET /v1/apod/?concept_tags=True&date=2015-10-11 HTTP/1.1" 500 -

I ran a quick test on my local machine by installing the version provided in requirements.txt

python3 -m pip install -Iv beautifulsoup4==4.5.3

And running a small snippet:

from bs4 import BeautifulSoup

text = """<body></body>"""
soup = BeautifulSoup(text, 'html.parser')

It returns:

AttributeError: module 'collections' has no attribute 'Callable'

However, the most up-to-date version of bs4 (4.11.1) returns the expected result without raising the exception.

It seems like it can be fixed by just updating the module version in the requirements.txt

It also seems to be related to #99

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