When I input a url, I get the following traceback:
Traceback (most recent call last):
File "C:/Repository/Python/urllinks1.py", line 12, in <module>
soup = BeautifulSoup(htmlDoc, 'html.parser')
File "C:\Repository/Python\bs4\__init__.py", line 215, in __init__
self._feed()
File "C:\Repository/Python\bs4\__init__.py", line 239, in _feed
self.builder.feed(self.markup)
File "C:\Repository/Python\bs4\builder\_htmlparser.py", line 164, in feed
parser.feed(markup)
File "C:\Users\vpalakodety\AppData\Local\Programs\Python\Python310\lib\html\parser.py", line 110, in feed
self.goahead(0)
File "C:\Users\vpalakodety\AppData\Local\Programs\Python\Python310\lib\html\parser.py", line 170, in goahead
k = self.parse_starttag(i)
File "C:\Users\vpalakodety\AppData\Local\Programs\Python\Python310\lib\html\parser.py", line 344, in parse_starttag
self.handle_starttag(tag, attrs)
File "C:\Repository/Python\bs4\builder\_htmlparser.py", line 62, in handle_starttag
self.soup.handle_starttag(name, None, None, attr_dict)
File "C:\Repository/Python\bs4\__init__.py", line 404, in handle_starttag
self.currentTag, self._most_recent_element)
File "C:\Repository/Python\bs4\element.py", line 1001, in __getattr__
return self.find(tag)
File "C:\Repository/Python\bs4\element.py", line 1238, in find
l = self.find_all(name, attrs, recursive, text, 1, **kwargs)
File "C:\Repository/Python\bs4\element.py", line 1259, in find_all
return self._find_all(name, attrs, text, limit, generator, **kwargs)
File "C:\Repository/Python\bs4\element.py", line 516, in _find_all
strainer = SoupStrainer(name, attrs, text, **kwargs)
File "C:\Repository/Python\bs4\element.py", line 1560, in __init__
self.text = self._normalize_search_value(text)
File "C:\Repository/Python\bs4\element.py", line 1565, in _normalize_search_value
if (isinstance(value, str) or isinstance(value, collections.Callable) or hasattr(value, 'match')
AttributeError: module 'collections' has no attribute 'Callable'
Could you please help me understand what am I doing wrong or what does the traceback mean?
Thank you.