That is what happen when you mix and match system packages and pip packages:
eventually, something breaks.
Something is FUBAR with (system) beautifulsoup and python 3.12. What? Most
likely the packet on your system is too old for python3.12 and use a deprecated
API.
Possible Solution: use a venv
If you are writing software: use a wrapper to activate the venv when the
software is called.
On Thu, 13 Feb 2025, Marc Shapiro via Dng wrote:
>I know that this is not, specifically, a Devuan issue, but can anyone
>help me with the following python error:
>
>Traceback (most recent call last):
> File "/usr/local/bin/pyquotes-y", line 12, in <module>
> import yfinance as yf
> File "/usr/local/lib/python3.12/dist-packages/yfinance/__init__.py",
>line 23, in <module>
> from .ticker import Ticker
> File "/usr/local/lib/python3.12/dist-packages/yfinance/ticker.py",
>line 29, in <module>
> from .base import TickerBase
> File "/usr/local/lib/python3.12/dist-packages/yfinance/base.py",
>line 39, in <module>
> from .data import YfData
> File "/usr/local/lib/python3.12/dist-packages/yfinance/data.py",
>line 5, in <module>
> from bs4 import BeautifulSoup
> File "/usr/lib/python3/dist-packages/bs4/__init__.py", line 64, in
><module>
> from .builder import (
> File "/usr/lib/python3/dist-packages/bs4/builder/__init__.py", line
>24, in <module>
> from bs4.element import (
> File "/usr/lib/python3/dist-packages/bs4/element.py", line 9, in <module>
> from bs4.css import CSS
> File "/usr/lib/python3/dist-packages/bs4/css.py", line 27, in <module>
> from bs4._typing import _NamespaceMapping
> File "/usr/lib/python3/dist-packages/bs4/_typing.py", line 16, in
><module>
> from typing_extensions import (
> File
>"/home/marc/.local/lib/python3.12/site-packages/typing_extensions.py",
>line 1167, in <module>
> class TypeVar(typing.TypeVar, _DefaultMixin, _root=True):
>TypeError: type 'typing.TypeVar' is not an acceptable base type
>
>
>It seems to be a problem in typing_extensions.py. Is it actually a
>bug there, or am I missing something somewhere else? Does something
>need to be upgraded?
>
>Marc
>
>_______________________________________________
>Dng mailing list
>Dng@???
>Manage your subscription: https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>Archive: https://lists.dyne.org/lurker/list/dng.en.html
--
Cheers,
Ludovic