4 ms·
Doesn't work for me. Which Python version is required? Traceback (most recent call last): File "./tickets.py", line 20, in <module> for listi
by nivertech 12y ago
Doesn't work for me. Which Python version is required?
Traceback (most recent call last):
File "./tickets.py", line 20, in <module>
for listing in soup.findall('p', {'class': 'row'}):
TypeError: 'NoneType' object is not callable
- danielforsyth 12y agoI am using 2.7.6
- nivertech 12y agoMaybe wrong BS version? $ sudo pip install BeautifulSoup Downloading/unpacking BeautifulSoup Downloading BeautifulSoup-3.2.1.tar.gz Running setup.py (path:/tmp/pip_build_root/BeautifulSoup/setup.py) egg_info for package BeautifulSoup Installing collected packages: BeautifulSoup Running setup.py install for BeautifulSoup Successfully installed BeautifulSoup Cleaning up...
- danielforsyth 12y agoAh yes thats the problem, I am using beautifulsoup4==4.3.2. Try pip install beautifulsoup4
- nivertech 12y agoI found the problem. I think your listing ate '_'. It should be 'soup.find_all' instead of 'soup.findall' and 'link_end' instead of 'linkend'
- danielforsyth 12y agoGood find! Fixed it, thanks!