:: Re: [DNG] help with python error
Top Pagina
Delete this message
Reply to this message
Auteur: Marc Shapiro
Datum:  
Aan: dng
Nieuwe Onderwerpen: Re: [DNG] help with python error (SOLVED)
Onderwerp: Re: [DNG] help with python error
Yes.  Thanks.

I tried to set up a venv for this project and had problems.  I tried a
few things with no luck, so I copied appdirs.py from the venv to my
dist-packages.  That is when this error came up.  If I rename the copied
file then it goes back to the old error of not finding appdirs.

I don't remember the exact error that I was getting with the venv, but I
will remove and rebuild it and try again.

Marc

On 2/14/25 6:17 AM, Ludovic Bellière via Dng wrote:
> 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
>