Python Forum
NotImplementedError: pseudo-class is not implemented - how to Update Python to solve
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NotImplementedError: pseudo-class is not implemented - how to Update Python to solve
#1
hello dear Python-experts, Smile

first of all: many many thanks for this awesome forum: this is one of the best places for Python. I am glad to be part of this great forum.

on anaconda which runs on MX-Linux i have runned a parser and got back some errorlogs:


Traceback (most recent call last):

  File "/home/martin/dev/europe_volun_with_pandas.py", line 57, in <module>
    soup.select_one('td:-soup-contains("Receiving") ~ td'),

  File "/home/martin/anaconda3/lib/python3.7/site-packages/bs4/element.py", line 1749, in select_one
    value = self.select(selector, namespaces, 1, **kwargs)

  File "/home/martin/anaconda3/lib/python3.7/site-packages/bs4/element.py", line 1784, in select
    results = soupsieve.select(selector, self, namespaces, limit, **kwargs)

  File "/home/martin/anaconda3/lib/python3.7/site-packages/soupsieve/__init__.py", line 114, in select
    return compile(select, namespaces, flags, **kwargs).select(tag, limit)

  File "/home/martin/anaconda3/lib/python3.7/site-packages/soupsieve/__init__.py", line 63, in compile
    return cp._cached_css_compile(pattern, namespaces, custom, flags)

  File "/home/martin/anaconda3/lib/python3.7/site-packages/soupsieve/css_parser.py", line 206, in _cached_css_compile
    CSSParser(pattern, custom=custom_selectors, flags=flags).process_selectors(),

  File "/home/martin/anaconda3/lib/python3.7/site-packages/soupsieve/css_parser.py", line 1062, in process_selectors
    return self.parse_selectors(self.selector_iter(self.pattern), index, flags)

  File "/home/martin/anaconda3/lib/python3.7/site-packages/soupsieve/css_parser.py", line 919, in parse_selectors
    has_selector, is_html = self.parse_pseudo_class(sel, m, has_selector, iselector, is_html)

  File "/home/martin/anaconda3/lib/python3.7/site-packages/soupsieve/css_parser.py", line 657, in parse_pseudo_class
    "'{}' pseudo-class is not implemented at this time".format(pseudo)
generally spoken: NotImplementedError: ':-soup-contains' pseudo-class is not implemented at this time
well i guess ( i suppose) that this error-log i get because i run older versions of python;

see what i have got at the moment - and yes: i guess i have to update python to be up to date - and to get rid of these errorlogs - is this true!?


see here the Anaconda system (version) and all the "ingredients" - like Python, VScode and Spyder... and its versions.

conda-base Python 3.7.6

Python 3.7.6 default, Jan 8 2020, 19:59:22)
Type "copyright", "credits" or "license" for more information.
IPython 7.12.0 -- An enhanced Interactive Python.

Spyder 4.0.1
The Scientific Python Development Environment | Spyder-IDE.org
Copyright © 2009-2019 Spyder Project Contributors and others.
Distributed under the terms of the MIT License.
Python 3.7.6 64-bit | Qt 5.9.6 | PyQt5 5.9.2 | Linux 4.19.0-6-amd64

VSCode 1.56.2



well - to avoid any issues (like the Nonimplemented-ones see above - i need to update python.
what do you say - !? How to update

at least python. Can i do this via commandline!?

i guess - i found this: https://stackoverflow.com/questions/6160...ion-to-3-8


Quote:Step 1: First install the Ubuntu software properties package if it’s not already installed on your system.

$ sudo apt update
and
$ sudo apt install software-properties-common
Step 2: After that run the commands to add the PPA.

$ sudo add-apt-repository ppa:deadsnakes/ppa
Step 3: Finally, run below to install Python 3.8

$ sudo apt update
$ sudo apt install python3.8
You can check as below:

$ python3 --version

see below what i have got back
$ python -m pip install pip
Requirement already satisfied: pip in ./anaconda3/lib/python3.7/site-packages (20.0.2)
(base) martin@mx:~
$ python -m pip install –upgrade pip
ERROR: Invalid requirement: '–upgrade'
(base) martin@mx:~
$ python -m pip install --upgrade pip
Collecting pip
  Downloading pip-21.1.1-py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 439 kB/s 
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed pip-21.1.1
(base) martin@mx:~
$ 
i saw another method - here:

https://levelup.gitconnected.com/a-guide...ccb3eae31a
Quote:In LINUX, you may use the following commands:

$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt update
$ sudo apt install python3.9
Then, you can check your new and existing Python installation version as commands below:


sudo apt update gives back here the folllowing:


(base) root@mx:/home/martin# sudo apt update
OK:1 http://deb.debian.org/debian buster-updates InRelease
OK:2 http://deb.debian.org/debian buster InRelease                                                 
OK:3 http://deb.debian.org/debian-security buster/updates InRelease                                
OK:4 http://dl.google.com/linux/chrome/deb stable InRelease                                        
OK:5 http://ftp.halifax.rwth-aachen.de/mxlinux/packages/mx/repo buster InRelease                   
0% [Verbunden mit packagecloud.io (54.183.38.243)] [Warten auf Kopfzeilen] [Verbunden mit packages.
OK:6 https://packages.microsoft.com/repos/vscode stable InRelease                                  
Ign:7 http://repo.vivaldi.com/stable/deb stable InRelease                                          
OK:8 http://repo.vivaldi.com/stable/deb stable Release                    
OK:9 https://packagecloud.io/AtomEditor/atom/any any InRelease
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Alle Pakete sind aktuell.
(base) root@mx:/home/martin# 
(base) root@mx:/home/martin# 
Wordpress - super toolkits a. http://wpgear.org/ :: und b. https://github.com/miziomon/awesome-wordpress :: Awesome WordPress: A curated list of amazingly awesome WordPress resources and awesome python things https://github.com/vinta/awesome-python
Reply


Messages In This Thread
NotImplementedError: pseudo-class is not implemented - how to Update Python to solve - by apollo - May-16-2021, 06:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  DF.groupby(col).min works, mean gets a "not implemented" error samgardner5 3 486 Feb-29-2024, 06:13 PM
Last Post: deanhystad
  class Update input (Gpio pin raspberry pi) caslor 2 796 Jan-30-2023, 08:05 PM
Last Post: caslor
Brick Have I implemented this function correctly? naggafin 4 2,346 May-22-2022, 02:52 AM
Last Post: stevendaprano
  Is it possible to update a CSS file from Python bigAL_python 4 2,289 Apr-20-2022, 01:38 PM
Last Post: bigAL_python
  Python selenium + Xevil to solve recaptcha sunny9495 6 3,401 Apr-04-2022, 10:23 AM
Last Post: sunny9495
Heart how to solve complex equations in python HoangF 3 2,805 Dec-26-2021, 07:04 PM
Last Post: HoangF
Question Python + Google Sheet | Best way to update specific cells in a single Update()? Vokofe 1 2,687 Dec-16-2020, 05:26 AM
Last Post: Vokofe
  Solve simple equation in Python kmll 4 3,102 Nov-01-2020, 04:34 PM
Last Post: deanhystad
  Update Python Files Harshil 3 2,274 Aug-28-2020, 10:52 AM
Last Post: Harshil
  XML update using python sathiyarajmca 1 2,099 Jun-18-2019, 06:11 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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