py4e icon indicating copy to clipboard operation
py4e copied to clipboard

Beautiful Soup 4.4.1, included with CSEV, is incompatible with Python 3.8

Open leonardr opened this issue 3 years ago • 1 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.

leonardr avatar Dec 28 '21 14:12 leonardr

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

srcatto avatar Apr 17 '22 01:04 srcatto

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.

csev avatar Jan 01 '24 18:01 csev

Thank you for doing this! It's most likely one those things that will silently go unnoticed, but you have my appreciation.

leonardr avatar Jan 01 '24 19:01 leonardr