urllinks.py sample code needs an import update to run beautifulsoup
nratzan opened this issue · 4 comments
nratzan commented
Hi Dr. Chuck,
I love the py4e courses! Thank you.
The urllinks.py sample code needs updating so beautiful soup works with newer versions of python, e.g. 3.10.
I'm getting an error saying the module collections isn't callable.
I found a solution on stackoverflow:
The urllinks.py file should have this included:
import collections
collections.Callable = collections.abc.Callable
Thank you for making so many great, free resources!
Noah
csev commented
Thanks Noah - this summer I will be going through these issues and fixing the course content.
pravintargaryen commented
Hi Noah,
The version in https://www.py4e.com/code3/urllinks.py is working fine it seems. I have checked it both on Replit and Google Colab as well