Python Forum
Error about parser library and tree builder
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error about parser library and tree builder
#6
It looks like ll is installed but the test as outlined above failed.

import requests
from bs4 import BeautifulSoup
  
url = 'http://CNN.com'
response = requests.get(url)
soup = BeautifulSoup(response.content, 'lxml')
print(soup.find('title').text)
The output is

Output:
FeatureNotFound Traceback (most recent call last) <ipython-input-3-cd8b12a29240> in <module> 4 url = 'http://CNN.com' 5 response = requests.get(url) ----> 6 soup = BeautifulSoup(response.content, 'lxml') 7 print(soup.find('title').text) ~\miniconda3\lib\site-packages\bs4\__init__.py in __init__(self, markup, features, builder, parse_only, from_encoding, exclude_encodings, element_classes, **kwargs) 241 builder_class = builder_registry.lookup(*features) 242 if builder_class is None: --> 243 raise FeatureNotFound( 244 "Couldn't find a tree builder with the features you " 245 "requested: %s. Do you need to install a parser library?" FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library
My guess is that lxml is not in the path. It is installed (see above conda list). Now how do I put it in the path? Assuming that is the correct solution?

Respectfully,

LZ
Reply


Messages In This Thread
RE: Error about parser library and tree builder - by Led_Zeppelin - Jun-09-2021, 01:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error in blend_modes library talgreen 6 1,027 Jul-01-2023, 05:32 PM
Last Post: talgreen
  python requests library .JSON() error mHosseinDS86 6 3,488 Dec-19-2022, 08:28 PM
Last Post: deanhystad
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 10,712 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  How to get GUI builder Kivy to work with Pycharm? river251 3 2,607 Jan-31-2021, 01:01 PM
Last Post: jefsummers
  error while installing any library using pip in windows AkashKansal 1 4,425 Sep-24-2020, 07:51 AM
Last Post: buran
  libhdf5 library error (opencv-contrib) 1979gian 0 1,965 May-11-2020, 06:10 PM
Last Post: 1979gian
  Syntax Error with Argument Parser aditya_man 1 3,944 Sep-30-2019, 01:21 PM
Last Post: ichabod801
  Error message when importing jsonlines library vakil67 5 7,390 May-16-2018, 08:51 PM
Last Post: vakil67
  Fix Memory Error while installing a library for Qgis alexastorga 0 2,598 Apr-13-2018, 04:54 PM
Last Post: alexastorga
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 4,839 May-06-2017, 11:29 AM
Last Post: harun2525

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020