Re: Funny error message

2021-01-01 Thread Bob van der Poel
> Assuming Python is maintained only at the system-level (cf --user or
> > venv) then it may be possible that installing some application that
> runs
> > 'on' Python added the local-library (as a "dependency"). Alternately,
> > many beginners following installation instructions on a
> paint-by-numbers
> > basis, may type/copy-paste commands without retaining any memory of
> > same.
> > [observation, not personal criticism]
> >
> > Python has been designed to offer flexibility. One of which is the
> > ability to have multiple, co-resident, versions of Python and/or
> > libraries. Of course, this also produces exactly the type of 'gotcha'
> > illustrated (detected, and solved) here.
> >
> > Someone more familiar with Python-packaging may improve/correct...
> >
> >
> > On a thematically-related, but OT-note:
> > I decided to install a 'fresh' version of Fedora 33 on this machine,
> > rather than performing a version-update. (required one hour from
> > start-to-finish - try that MS-Win users!) The Python-relevance was to
> > ensure there was no legacy-Python2 left 'lying-around'. However, the
> > GIMP (popular graphics package) still uses (and has some sort of
> > 'exemption' to use) Python2. Stymied! Not quite - there's a Flatpak
> > option - which will enable my Python3-only objective by ring-fencing
> the
> > GIMP and its dependencies. However... now I have a system package
> > manager (dnf (~apt)) installing most system-software and 'other
> stuff'
> > under a different method (I took the same approach with the Chromium
> > browser) - how long will it be before such 'cleverness' is
> > forgotten/trips me up?
> >
> >
> > I have installed a few packages using pip. I "try" to do so as root
> > (this is basically a one user machine) ... but I may have installed as
> > user. Still, it should not have brought in a complete py set of
> > libraries. I'm going with the idea that some other package, either via
> > apt or flatpak (which I really don't trust) decided to be nice. But it
> > was a mess to have python distros in /usr/lib, /usr/local/lib and
> > ./local ... I am going to really try in the future to have everything in
> > one spot!
>
> I'm not sure if you mean that you intend moving files from the directory
> where they were loaded to somewhere else - I would hesitate!
>
>
> As before, there is a tradeoff between 'tidiness' and 'flexibility'.
> Perhaps do some reading to ensure a grasp of Python's library/directory
> structures and system/virtual environments, first?
>
> What me? Read? Actually a good suggestion ... I'll make note of the
recommended reading list. Thanks.


> Suggestions:
> sys.path https://docs.python.org/3/using/cmdline.html
> 2.3. Python-related paths and files
> https://docs.python.org/3/using/unix.html#python-related-paths-and-files
> PEP 370 -- Per user site-packages directory
> https://www.python.org/dev/peps/pep-0370/
> and to really dive 'under the covers'
> https://www.python.org/dev/peps/pep-0587/
> - with plenty more, both on-site and externally.
>
> It quickly becomes apparent that there are risks in assuming that what
> 'should be done' for one project/application will 'always' be OK. Sadly,
> such may have an (undesirable) impact on another/others. Thus, the
> virtue of project-dedicated venvs (alternately OpSys-level containers)!
>
>
> > Speaking of "one spot" I also see that some functions do not create the
> > .pyc versions. Running as a user, the compressed version can't be
> > created in /usr/lib/. I assume the installer is supposed to do that, but
> > it does appear that it's not 100%.
>
> There are multiple reasons for this, but the first time that code is
> run, a .pyc will (presumably) be created - and we're back to
> considerations of Python environments, Python cf C, perhaps even
>
>
Oh no! Not these damned dragons again :)

But, seriously. No, I have no idea of moving installed stuff around between
/usr /.local and /usr/local. There lies no dragons but madness :) I meant
that I will pay more attention as to what the installer(s) are doing.

Thanks for the input.


-- 

 Listen to my FREE CD at http://www.mellowood.ca/music/cedars 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: b...@mellowood.ca
WWW:   http://www.mellowood.ca
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Funny error message

2021-01-01 Thread DL Neil via Python-list
On 1/2/21 9:39 AM, Bob van der Poel wrote:
> 
> 
> On Fri, Jan 1, 2021 at 12:17 PM DL Neil via Python-list
> mailto:python-list@python.org>> wrote:
> 
> On 1/2/21 6:35 AM, Bob van der Poel wrote:
> > Found it!
> 
> Well done!
> 
> 
> >>     I had the proper urllib3 installed. But, in my .local/lib/ a
> previous
> >>     version was installed. Removing .local/lib/python3.8 has
> resolved the
> >>     problem.
> >>
> >>     Anyone hazard a guess as to why I had a .local tree (nope, I did
> >>     not create
> >>     it ... I don't think!).
> >>
> >
> >     That is where "python3.8 -m pip install --user" puts the packages
> >     you install.
> >
> >     Barry
> >
> >
> >
> > Okay ... I'll take your word for it. But, I really don't think I've
> > every run that command :)
> 
> Assuming Python is maintained only at the system-level (cf --user or
> venv) then it may be possible that installing some application that runs
> 'on' Python added the local-library (as a "dependency"). Alternately,
> many beginners following installation instructions on a paint-by-numbers
> basis, may type/copy-paste commands without retaining any memory of
> same.
> [observation, not personal criticism]
> 
> Python has been designed to offer flexibility. One of which is the
> ability to have multiple, co-resident, versions of Python and/or
> libraries. Of course, this also produces exactly the type of 'gotcha'
> illustrated (detected, and solved) here.
> 
> Someone more familiar with Python-packaging may improve/correct...
> 
> 
> On a thematically-related, but OT-note:
> I decided to install a 'fresh' version of Fedora 33 on this machine,
> rather than performing a version-update. (required one hour from
> start-to-finish - try that MS-Win users!) The Python-relevance was to
> ensure there was no legacy-Python2 left 'lying-around'. However, the
> GIMP (popular graphics package) still uses (and has some sort of
> 'exemption' to use) Python2. Stymied! Not quite - there's a Flatpak
> option - which will enable my Python3-only objective by ring-fencing the
> GIMP and its dependencies. However... now I have a system package
> manager (dnf (~apt)) installing most system-software and 'other stuff'
> under a different method (I took the same approach with the Chromium
> browser) - how long will it be before such 'cleverness' is
> forgotten/trips me up?
> 
> 
> I have installed a few packages using pip. I "try" to do so as root
> (this is basically a one user machine) ... but I may have installed as
> user. Still, it should not have brought in a complete py set of
> libraries. I'm going with the idea that some other package, either via
> apt or flatpak (which I really don't trust) decided to be nice. But it
> was a mess to have python distros in /usr/lib, /usr/local/lib and
> ./local ... I am going to really try in the future to have everything in
> one spot!

I'm not sure if you mean that you intend moving files from the directory
where they were loaded to somewhere else - I would hesitate!


As before, there is a tradeoff between 'tidiness' and 'flexibility'.
Perhaps do some reading to ensure a grasp of Python's library/directory
structures and system/virtual environments, first?

Suggestions:
sys.path https://docs.python.org/3/using/cmdline.html
2.3. Python-related paths and files
https://docs.python.org/3/using/unix.html#python-related-paths-and-files
PEP 370 -- Per user site-packages directory
https://www.python.org/dev/peps/pep-0370/
and to really dive 'under the covers'
https://www.python.org/dev/peps/pep-0587/
- with plenty more, both on-site and externally.

It quickly becomes apparent that there are risks in assuming that what
'should be done' for one project/application will 'always' be OK. Sadly,
such may have an (undesirable) impact on another/others. Thus, the
virtue of project-dedicated venvs (alternately OpSys-level containers)!


> Speaking of "one spot" I also see that some functions do not create the
> .pyc versions. Running as a user, the compressed version can't be
> created in /usr/lib/. I assume the installer is supposed to do that, but
> it does appear that it's not 100%.

There are multiple reasons for this, but the first time that code is
run, a .pyc will (presumably) be created - and we're back to
considerations of Python environments, Python cf C, perhaps even
differences between OpSys - certainly and once-again, 'here be dragons'...
-- 
Regards =dn
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Funny error message

2021-01-01 Thread Bob van der Poel
On Fri, Jan 1, 2021 at 12:17 PM DL Neil via Python-list <
python-list@python.org> wrote:

> On 1/2/21 6:35 AM, Bob van der Poel wrote:
> > Found it!
>
> Well done!
>
>
> >> I had the proper urllib3 installed. But, in my .local/lib/ a
> previous
> >> version was installed. Removing .local/lib/python3.8 has resolved
> the
> >> problem.
> >>
> >> Anyone hazard a guess as to why I had a .local tree (nope, I did
> >> not create
> >> it ... I don't think!).
> >>
> >
> > That is where "python3.8 -m pip install --user" puts the packages
> > you install.
> >
> > Barry
> >
> >
> >
> > Okay ... I'll take your word for it. But, I really don't think I've
> > every run that command :)
>
> Assuming Python is maintained only at the system-level (cf --user or
> venv) then it may be possible that installing some application that runs
> 'on' Python added the local-library (as a "dependency"). Alternately,
> many beginners following installation instructions on a paint-by-numbers
> basis, may type/copy-paste commands without retaining any memory of same.
> [observation, not personal criticism]
>
> Python has been designed to offer flexibility. One of which is the
> ability to have multiple, co-resident, versions of Python and/or
> libraries. Of course, this also produces exactly the type of 'gotcha'
> illustrated (detected, and solved) here.
>
> Someone more familiar with Python-packaging may improve/correct...
>
>
> On a thematically-related, but OT-note:
> I decided to install a 'fresh' version of Fedora 33 on this machine,
> rather than performing a version-update. (required one hour from
> start-to-finish - try that MS-Win users!) The Python-relevance was to
> ensure there was no legacy-Python2 left 'lying-around'. However, the
> GIMP (popular graphics package) still uses (and has some sort of
> 'exemption' to use) Python2. Stymied! Not quite - there's a Flatpak
> option - which will enable my Python3-only objective by ring-fencing the
> GIMP and its dependencies. However... now I have a system package
> manager (dnf (~apt)) installing most system-software and 'other stuff'
> under a different method (I took the same approach with the Chromium
> browser) - how long will it be before such 'cleverness' is
> forgotten/trips me up?
>

I have installed a few packages using pip. I "try" to do so as root (this
is basically a one user machine) ... but I may have installed as user.
Still, it should not have brought in a complete py set of libraries. I'm
going with the idea that some other package, either via apt or flatpak
(which I really don't trust) decided to be nice. But it was a mess to have
python distros in /usr/lib, /usr/local/lib and ./local ... I am going to
really try in the future to have everything in one spot!

Speaking of "one spot" I also see that some functions do not create the
.pyc versions. Running as a user, the compressed version can't be created
in /usr/lib/. I assume the installer is supposed to do that, but it does
appear that it's not 100%.


-- 

 Listen to my FREE CD at http://www.mellowood.ca/music/cedars 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: b...@mellowood.ca
WWW:   http://www.mellowood.ca
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Funny error message

2021-01-01 Thread DL Neil via Python-list
On 1/2/21 6:35 AM, Bob van der Poel wrote:
> Found it!

Well done!


>> I had the proper urllib3 installed. But, in my .local/lib/ a previous
>> version was installed. Removing .local/lib/python3.8 has resolved the
>> problem.
>>
>> Anyone hazard a guess as to why I had a .local tree (nope, I did
>> not create
>> it ... I don't think!).
>>
> 
> That is where "python3.8 -m pip install --user" puts the packages
> you install.
> 
> Barry
> 
> 
> 
> Okay ... I'll take your word for it. But, I really don't think I've
> every run that command :)

Assuming Python is maintained only at the system-level (cf --user or
venv) then it may be possible that installing some application that runs
'on' Python added the local-library (as a "dependency"). Alternately,
many beginners following installation instructions on a paint-by-numbers
basis, may type/copy-paste commands without retaining any memory of same.
[observation, not personal criticism]

Python has been designed to offer flexibility. One of which is the
ability to have multiple, co-resident, versions of Python and/or
libraries. Of course, this also produces exactly the type of 'gotcha'
illustrated (detected, and solved) here.

Someone more familiar with Python-packaging may improve/correct...


On a thematically-related, but OT-note:
I decided to install a 'fresh' version of Fedora 33 on this machine,
rather than performing a version-update. (required one hour from
start-to-finish - try that MS-Win users!) The Python-relevance was to
ensure there was no legacy-Python2 left 'lying-around'. However, the
GIMP (popular graphics package) still uses (and has some sort of
'exemption' to use) Python2. Stymied! Not quite - there's a Flatpak
option - which will enable my Python3-only objective by ring-fencing the
GIMP and its dependencies. However... now I have a system package
manager (dnf (~apt)) installing most system-software and 'other stuff'
under a different method (I took the same approach with the Chromium
browser) - how long will it be before such 'cleverness' is
forgotten/trips me up?
-- 
Regards =dn
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Funny error message

2021-01-01 Thread Bob van der Poel
Found it!

>
> I had the proper urllib3 installed. But, in my .local/lib/ a previous
> version was installed. Removing .local/lib/python3.8 has resolved the
> problem.
>
> Anyone hazard a guess as to why I had a .local tree (nope, I did not create
> it ... I don't think!).
>
>
> That is where "python3.8 -m pip install --user" puts the packages you
> install.
>
> Barry
>
>
>
> Okay ... I'll take your word for it. But, I really don't think I've every
run that command :)


-- 

 Listen to my FREE CD at http://www.mellowood.ca/music/cedars 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: b...@mellowood.ca
WWW:   http://www.mellowood.ca
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Funny error message

2021-01-01 Thread Barry Scott



> On 1 Jan 2021, at 16:50, Bob van der Poel  wrote:
> 
> On Thu, Dec 31, 2020 at 9:25 PM DL Neil via Python-list <
> python-list@python.org > wrote:
> 
>> On 1/1/21 11:46 AM, Bob van der Poel wrote:
>>> When I run python from the command line and generate an error I get the
>>> following:
>>> 
>>> Python 3.8.5 (default, Jul 28 2020, 12:59:40)
>>> [GCC 9.3.0] on linux
>>> Type "help", "copyright", "credits" or "license" for more information.
>> z
>>> /home/bob/.local/lib/python3.8/site-packages/requests/__init__.py:89:
>>> RequestsDependencyWarning: urllib3 (1.24.3) or chardet (4.0.0) doesn't
>>> match a supported version!
>>>  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
>>> Traceback (most recent call last):
>>>  File "", line 1, in 
>>> NameError: name 'z' is not defined
>>> 
>>> I understand "z in not defined" ... but what's with the warnings?
>> 
>> 
>> The implication is that there is a version-mismatch between Python 3.8
>> and whichever urllib3 and chardet libraries currently installed.
>> 
>> Recommend updating the system, container, or venv: either Python, pip3
>> of the two and/or requests or html-parser [as appropriate to the
>> installed libraries - see below], or both/all.
>> 
>> 
>> System here runs as-expected:
>> 
>> dn $ ... python
>> Python 3.9.1 (default, Dec  8 2020, 00:00:00)
>> [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
> z
>> Traceback (most recent call last):
>>  File "", line 1, in 
>> NameError: name 'z' is not defined
> import chardet
> import urllib3
> exit()
>> dn $ ... pip show chardet urllib3
>> Name: chardet
>> Version: 3.0.4
>> Summary: Universal encoding detector for Python 2 and 3
>> Home-page: https://github.com/chardet/chardet
>> Author: Mark Pilgrim
>> Author-email: m...@diveintomark.org
>> License: LGPL
>> Location: /usr/lib/python3.9/site-packages
>> Requires:
>> Required-by: html5-parser, requests
>> ---
>> Name: urllib3
>> Version: 1.25.8
>> Summary: HTTP library with thread-safe connection pooling, file post,
>> and more.
>> Home-page: https://urllib3.readthedocs.io/
>> Author: Andrey Petrov
>> Author-email: andrey.pet...@shazow.net
>> License: MIT
>> Location: /usr/lib/python3.9/site-packages
>> Requires:
>> Required-by: requests
>> 
>> 
> Found it!
> 
> I had the proper urllib3 installed. But, in my .local/lib/ a previous
> version was installed. Removing .local/lib/python3.8 has resolved the
> problem.
> 
> Anyone hazard a guess as to why I had a .local tree (nope, I did not create
> it ... I don't think!).
> 

That is where "python3.8 -m pip install --user" puts the packages you install.

Barry


> 
> -- 
> 
>  Listen to my FREE CD at http://www.mellowood.ca/music/cedars 
>  
> Bob van der Poel ** Wynndel, British Columbia, CANADA **
> EMAIL: b...@mellowood.ca 
> WWW:   http://www.mellowood.ca 
> -- 
> https://mail.python.org/mailman/listinfo/python-list 
> 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Funny error message

2021-01-01 Thread Bob van der Poel
On Thu, Dec 31, 2020 at 9:25 PM DL Neil via Python-list <
python-list@python.org> wrote:

> On 1/1/21 11:46 AM, Bob van der Poel wrote:
> > When I run python from the command line and generate an error I get the
> > following:
> >
> > Python 3.8.5 (default, Jul 28 2020, 12:59:40)
> > [GCC 9.3.0] on linux
> > Type "help", "copyright", "credits" or "license" for more information.
>  z
> > /home/bob/.local/lib/python3.8/site-packages/requests/__init__.py:89:
> > RequestsDependencyWarning: urllib3 (1.24.3) or chardet (4.0.0) doesn't
> > match a supported version!
> >   warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
> > Traceback (most recent call last):
> >   File "", line 1, in 
> > NameError: name 'z' is not defined
> >
> > I understand "z in not defined" ... but what's with the warnings?
>
>
> The implication is that there is a version-mismatch between Python 3.8
> and whichever urllib3 and chardet libraries currently installed.
>
> Recommend updating the system, container, or venv: either Python, pip3
> of the two and/or requests or html-parser [as appropriate to the
> installed libraries - see below], or both/all.
>
>
> System here runs as-expected:
>
> dn $ ... python
> Python 3.9.1 (default, Dec  8 2020, 00:00:00)
> [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> z
> Traceback (most recent call last):
>   File "", line 1, in 
> NameError: name 'z' is not defined
> >>> import chardet
> >>> import urllib3
> >>> exit()
> dn $ ... pip show chardet urllib3
> Name: chardet
> Version: 3.0.4
> Summary: Universal encoding detector for Python 2 and 3
> Home-page: https://github.com/chardet/chardet
> Author: Mark Pilgrim
> Author-email: m...@diveintomark.org
> License: LGPL
> Location: /usr/lib/python3.9/site-packages
> Requires:
> Required-by: html5-parser, requests
> ---
> Name: urllib3
> Version: 1.25.8
> Summary: HTTP library with thread-safe connection pooling, file post,
> and more.
> Home-page: https://urllib3.readthedocs.io/
> Author: Andrey Petrov
> Author-email: andrey.pet...@shazow.net
> License: MIT
> Location: /usr/lib/python3.9/site-packages
> Requires:
> Required-by: requests
>
>
Found it!

I had the proper urllib3 installed. But, in my .local/lib/ a previous
version was installed. Removing .local/lib/python3.8 has resolved the
problem.

Anyone hazard a guess as to why I had a .local tree (nope, I did not create
it ... I don't think!).


-- 

 Listen to my FREE CD at http://www.mellowood.ca/music/cedars 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: b...@mellowood.ca
WWW:   http://www.mellowood.ca
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Funny error message

2021-01-01 Thread Bob van der Poel
It appears that a couple of things are happening ... and not being a python
install expert by a long shot, none of it makes sense to me.

But, let me first state that I've never screwed around with the python
installation. I let the Ubuntu packager take care of that.

- running "python -v" I get A LOT of data about various modules being
loaded, etc. I see that most of the modules are loaded from the system dir
/usr/lib/python3.8 but some from .local/lib/python3.8. I have never created
the .local tree so I, again, assume that the installer is doing this. BTW,
sys.path is:
['', '/usr/lib/python38.zip', '/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload', '/home/bob/.local

   /lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages',
'/usr/lib/python3/dist-packages']

- running python -v gives too much info. I really can't see what is causing
the unneeded text, but assume it is "requests". Note that this is the
module from .local. Experimenting, I deleted .local/.../requests and it is
now using /usr/.../requests. I've undeleted the .local version.

- creating a one line script with only a bad command in it and running
"python -v script.py >err_file" does not give the lengthy printout. The
same error message is displayed on the terminal.

I really have no idea ... and don't care that much, except it is annoying
to have these same lines repeated over and over again after every error.
Could this be a bug in requests?


On Fri, Jan 1, 2021 at 3:03 AM Peter Otten <__pete...@web.de> wrote:

> On 31/12/2020 23:46, Bob van der Poel wrote:
>
> > When I run python from the command line and generate an error I get the
> > following:
> >
> > Python 3.8.5 (default, Jul 28 2020, 12:59:40)
> > [GCC 9.3.0] on linux
> > Type "help", "copyright", "credits" or "license" for more information.
>  z
> > /home/bob/.local/lib/python3.8/site-packages/requests/__init__.py:89:
> > RequestsDependencyWarning: urllib3 (1.24.3) or chardet (4.0.0) doesn't
> > match a supported version!
> >warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported
> "
> > Traceback (most recent call last):
> >File "", line 1, in 
> > NameError: name 'z' is not defined
> >
> > I understand "z in not defined" ... but what's with the warnings?
>
> It looks like Python tries to import requests as a side effect of
> printing the traceback.
> Start the interpreter in verbose mode
>
> $ python -v
>
> and trigger the name error again to see which module triggers that import.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>


-- 

 Listen to my FREE CD at http://www.mellowood.ca/music/cedars 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: b...@mellowood.ca
WWW:   http://www.mellowood.ca
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Funny error message

2021-01-01 Thread Peter Otten

On 31/12/2020 23:46, Bob van der Poel wrote:


When I run python from the command line and generate an error I get the
following:

Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

z

/home/bob/.local/lib/python3.8/site-packages/requests/__init__.py:89:
RequestsDependencyWarning: urllib3 (1.24.3) or chardet (4.0.0) doesn't
match a supported version!
   warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
   File "", line 1, in 
NameError: name 'z' is not defined

I understand "z in not defined" ... but what's with the warnings?


It looks like Python tries to import requests as a side effect of 
printing the traceback.

Start the interpreter in verbose mode

$ python -v

and trigger the name error again to see which module triggers that import.

--
https://mail.python.org/mailman/listinfo/python-list


Re: Funny error message

2020-12-31 Thread DL Neil via Python-list
On 1/1/21 11:46 AM, Bob van der Poel wrote:
> When I run python from the command line and generate an error I get the
> following:
> 
> Python 3.8.5 (default, Jul 28 2020, 12:59:40)
> [GCC 9.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
 z
> /home/bob/.local/lib/python3.8/site-packages/requests/__init__.py:89:
> RequestsDependencyWarning: urllib3 (1.24.3) or chardet (4.0.0) doesn't
> match a supported version!
>   warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
> Traceback (most recent call last):
>   File "", line 1, in 
> NameError: name 'z' is not defined
> 
> I understand "z in not defined" ... but what's with the warnings?


The implication is that there is a version-mismatch between Python 3.8
and whichever urllib3 and chardet libraries currently installed.

Recommend updating the system, container, or venv: either Python, pip3
of the two and/or requests or html-parser [as appropriate to the
installed libraries - see below], or both/all.


System here runs as-expected:

dn $ ... python
Python 3.9.1 (default, Dec  8 2020, 00:00:00)
[GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> z
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'z' is not defined
>>> import chardet
>>> import urllib3
>>> exit()
dn $ ... pip show chardet urllib3
Name: chardet
Version: 3.0.4
Summary: Universal encoding detector for Python 2 and 3
Home-page: https://github.com/chardet/chardet
Author: Mark Pilgrim
Author-email: m...@diveintomark.org
License: LGPL
Location: /usr/lib/python3.9/site-packages
Requires:
Required-by: html5-parser, requests
---
Name: urllib3
Version: 1.25.8
Summary: HTTP library with thread-safe connection pooling, file post,
and more.
Home-page: https://urllib3.readthedocs.io/
Author: Andrey Petrov
Author-email: andrey.pet...@shazow.net
License: MIT
Location: /usr/lib/python3.9/site-packages
Requires:
Required-by: requests

-- 
Regards =dn
-- 
https://mail.python.org/mailman/listinfo/python-list


Funny error message

2020-12-31 Thread Bob van der Poel
When I run python from the command line and generate an error I get the
following:

Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> z
/home/bob/.local/lib/python3.8/site-packages/requests/__init__.py:89:
RequestsDependencyWarning: urllib3 (1.24.3) or chardet (4.0.0) doesn't
match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'z' is not defined

I understand "z in not defined" ... but what's with the warnings?

-- 

 Listen to my FREE CD at http://www.mellowood.ca/music/cedars 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: b...@mellowood.ca
WWW:   http://www.mellowood.ca
-- 
https://mail.python.org/mailman/listinfo/python-list