Beautiful Soup 4.4.1, included with CSEV, is incompatible with Python 3.8
leonardr opened this issue · 3 comments
I'm the author of the Beautiful Soup library included in this project. I got a report of someone running this code against Python 3.8 and getting the deprecation error described in this Beautiful Soup ticket. I'm filing this ticket to close the loop.
Upgrading to version 4.7.1 of Beautiful Soup or later should solve the problem without changing the behavior of any code that depends on the library.
The course provides a working bs4.zip as part of the downloadable course code, which is unzipped in the working code folder. It's also covered in pinned posts in the discussions. From the switch to Python 3 several years ago until Python 3.10 this has worked. From 3.10 the students are told to - pip install beautifulsoup4 and delete the unzipped bs4 folder.
As you noticed, the issue was installing and having the unzipped version present. 1 of the 4 bullet points in the pinned post is
- make sure that you have deleted the bs4 folder if you downloaded it.
Thanks for the update.
Course Mentor
I have updated the bs4.zip file on www.py4e.com and it should work with modern versions of Python without any changes to the documentation or book. Please open a new issue if this is not the case.
Thank you for doing this! It's most likely one those things that will silently go unnoticed, but you have my appreciation.