Re: Isn't TypeError built in?
On 2021-12-13 12:22:28 +1100, Mike Dewhirst via Python-list wrote: > Obviously something is wrong elsewhere but I'm not sure where to look. > Ubuntu 20.04 with plenty of RAM. [...] > [Mon Dec 13 01:15:49.885659 2021] [mpm_event:notice] [pid 1033:tid > 140446449658944] AH00489: Apache/2.4.41 (Ubuntu) SVN/1.13.0 OpenSSL/1.1.1f > mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal operations > [Mon Dec 13 01:15:49.885664 2021] [core:notice] [pid 1033:tid > 140446449658944] AH00094: Command line: '/usr/sbin/apache2' > Exception ignored in: > Traceback (most recent call last): > File "/usr/local/lib/python3.8/dist-packages/asgiref/local.py", line 96, > in __del__ > NameError: name 'TypeError' is not defined Did you upgrade the OS recently and do you use virtual environents with mod_wsgi? "Impossible" errors like the above are common when the virtual environment was built with a different (older) version of the Python interpreter than the one trying to use it. Nuking and rebuilding the virtual environment is usually the quickest way to fix it. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | [email protected] |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature -- https://mail.python.org/mailman/listinfo/python-list
Re: email.message_from_file & quoted printable
> That sometimes you want the raw content as it was in the file? That if > you have that choice (decoded or raw) the default should be False, as it > does less? Yeah, thinking back later, the round-trip possibility seemed plausible. I'll stop overthinking this now... > That we my _first_ instinct - I've never used get_payload(), myself, and > I've written my own complete mailfiler :-) I'm only trying to display email through a web browser, possibly with a link to the raw message. > Really, if a function isn't doing what you want you should always read > the docs for that function specificly, even if you don't want to read > the entire module docs (which is a big ask). Yeah, my mental model was simply off. I frequently pull up docs in my browser. I was thinking the message contents would be normalized when reading. It didn't occur to me the transformation would occur on the way out. I think another way I might have saved myself was if I was using a modern IDE where I might have gotten some hints hovering over the method call. But, I'm an End user. I'm sure there is some add-on package I could install, but I haven't looked. Skip -- https://mail.python.org/mailman/listinfo/python-list
Re: Isn't TypeError built in?
Thanks Peter ... the problem was all mine.Can't quite remember what it was exactly but I introduced a bug in my own code and it manifested down there in the bowels of the snake.I suppose that indicates a possible kink to be ironed out and if that interests you I am happy to retrace my steps and describe it.Fyi, there was nothing out of kilter in the machine. It was in production and is stable.CheersMike--(Unsigned mail from my phone) Original message From: "Peter J. Holzer" Date: 26/12/21 06:19 (GMT+10:00) To: [email protected] Subject: Re: Isn't TypeError built in? On 2021-12-13 12:22:28 +1100, Mike Dewhirst via Python-list wrote:> Obviously something is wrong elsewhere but I'm not sure where to look.> Ubuntu 20.04 with plenty of RAM.[...]> [Mon Dec 13 01:15:49.885659 2021] [mpm_event:notice] [pid 1033:tid> 140446449658944] AH00489: Apache/2.4.41 (Ubuntu) SVN/1.13.0 OpenSSL/1.1.1f> mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal operations> [Mon Dec 13 01:15:49.885664 2021] [core:notice] [pid 1033:tid> 140446449658944] AH00094: Command line: '/usr/sbin/apache2'> Exception ignored in: > Traceback (most recent call last):> File "/usr/local/lib/python3.8/dist-packages/asgiref/local.py", line 96,> in __del__> NameError: name 'TypeError' is not definedDid you upgrade the OS recently and do you use virtual environents withmod_wsgi?"Impossible" errors like the above are common when the virtualenvironment was built with a different (older) version of the Pythoninterpreter than the one trying to use it. Nuking and rebuilding thevirtual environment is usually the quickest way to fix it. hp-- _ | Peter J. Holzer | Story must make more sense than reality.|_|_) | || | | [email protected] | -- Charles Stross, "Creative writing__/ | http://www.hjp.at/ | challenge!"-- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Uninstall old python version(Python 3.9.7)
I had uninstalled Python 3.9.7 before but it wasn't uninstalled completely. I found it still in my computer and when I click "uninstall", it sent me a board "No Python 3.9 installation was detected". Of course, it won't be an issue if it defaulted my main Python version on my computer and I can't use some libraries I installed like numpy, matplotlib, networkx,... To solve my python homework. I found some help on the internet but it wasn't improved. I don't know how to fix it. Please help me. Thanks and Regards, Cong Huy Sent from [1]Mail for Windows References Visible links 1. https://go.microsoft.com/fwlink/?LinkId=550986 -- https://mail.python.org/mailman/listinfo/python-list
Uninstall old python version(Python 3.9.7)
I uninstalled Python 3.9.7 but I can't delete completely. And I received a notification "no Python 3.9 was detected". Of course, it won't be an issue if it defaulted my python version on my computer and it makes me can't use some libraries I installed before like numpy, matplotlib and network to solve my homework. I don't know how to fix it. Help me, please. Sent from [1]Mail for Windows References Visible links 1. https://go.microsoft.com/fwlink/?LinkId=550986 -- https://mail.python.org/mailman/listinfo/python-list
recover pickled data: pickle data was truncated
Normally, the shelve data should be read and write by only one process at a time, but unfortunately it was simultaneously read and write by two processes, thus corrupted it. Is there any way to recover all data in it ? Currently I just get "pickle data was truncated" exception after reading a portion of the data? Data and code here :https://drive.google.com/file/d/137nJFc1TvOge88EjzhnFX9bXg6vd0RYQ/view?usp=sharing -- https://mail.python.org/mailman/listinfo/python-list
