Issue
I'm beginner in python and got a project, where BeautifulSoup is required. In the code its referenced like this:
from bs4 import BeautifulSoup
Although I installed BeeatifulSoup with PyCharm, I'm getting this error:
ImportError: No module named bs4
When I change it to:
from BeautifulSoup import BeautifulSoup
I'm getting this error, where a BeautifulSoup object is used:
links = soupObject.find_all("a")
TypeError: 'NoneType' object is not callable
And when I simply change to:
import BeautifulSoup
Im getting this error:
soup = BeautifulSoup(param)
TypeError: 'module' object is not callable
I really don't know why this code is not working on my machine? How could I fix it? Thanks
Solution
When you're searching for available packages in PyCharm to install into your environment, and you lookup beautifulsoup
be sure to install beautifulsoup4
and not BeautifulSoup
if your requirement is to use v4+.
Answered By - Christian Witts
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.