python
Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from cssselect.parser import Element, FunctionalPseudoElement, PseudoElement
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'PseudoElement' from 'cssselect.parser' (/home/someuser/.pyenv/versions/test/lib/python3.10/site-packages/cssselect/parser.py)
>>>
This error is generated
ImportError: cannot import name 'PseudoElement' from 'cssselect.parser'
at https://github.com/scrapy/parsel/blob/master/parsel/csstranslator.py#L8 when used with cssselect < 1.2.0.cssselect
is set to be any version from 0.9 https://github.com/scrapy/parsel/blob/master/setup.py#L28How to reproduce:
cssselect == 1.1.0
. Install the latestparsel