ImportError with requests in scriptrunner

#1
by cdleong - opened

────────────────────────── Traceback (most recent call last) ───────────────────────────
/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py:
128 in exec_func_with_error_handling

/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner
.py:669 in code_to_exec

/home/user/app/app.py:3 in

  1 import streamlit as st                                                          
  2 import langcodes                                                                

❱ 3 from requests_html import HTMLSession
4 import urllib
5 import requests
6 session = HTMLSession()

/usr/local/lib/python3.10/site-packages/requests_html.py:14 in

 11 from pyquery import PyQuery                                                     
 12                                                                                 
 13 from fake_useragent import UserAgent                                            

❱ 14 from lxml.html.clean import Cleaner
15 import lxml
16 from lxml import etree
17 from lxml.html import HtmlElement

/usr/local/lib/python3.10/site-packages/lxml/html/clean.py:18 in

15 │   │   "word_break_html",                                                       
16 │   ]                                                                            
17 except ImportError:                                                              

❱ 18 │ raise ImportError(
19 │ │ "lxml.html.clean module is now a separate project lxml_html_clean.\n"
20 │ │ "Install lxml[html_clean] or lxml_html_clean directly."
21 │ ) from None
────────────────────────────────────────────────────────────────────────────────────────
ImportError: lxml.html.clean module is now a separate project lxml_html_clean.
Install lxml[html_clean] or lxml_html_clean directly.

Sign up or log in to comment