RE: [Tutor] Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread AVI GROSS via Python-list
tware or interest. -Original Message- From: Tutor On Behalf Of Alan Gauld via Tutor Sent: Tuesday, September 3, 2024 4:41 AM To: tu...@python.org Cc: python-list@python.org Subject: Re: [Tutor] Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found

Re: Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread geodandw via Python-list
On 9/2/24 11:36, Barry Scott wrote: On 2 Sep 2024, at 15:00, marc nicole via Python-list wrote: I am using Python 2.7 on Windows 10 Why? Install Python 3.12 and it will be easier to get help and support. If you have legacy that still needs porting then you can install 3.12 along side the

Re: [Tutor] Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread marc nicole via Python-list
at 2.7 is unsupported and has > been for many years now. Its also inferior in most > respects including its error reporting. > If possible you should upgrade to 3.X > > > from multiprocessing import Process > > def do_something(text): > > print(text) > > if __n

Re: Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-02 Thread Barry Scott via Python-list
> On 2 Sep 2024, at 15:00, marc nicole via Python-list > wrote: > > I am using Python 2.7 on Windows 10 Why? Install Python 3.12 and it will be easier to get help and support. If you have legacy that still needs porting then you can install 3.12 along side the unsupported 3.12. Barry --

Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-02 Thread marc nicole via Python-list
): print(text) if __name__ == "__main__": q = Process(target=do_something,args=("somecmd") ) q.start() # following code should execute right after the q.start() call (not until it returns) . But getting the error at the call of Process().start(): pickle.

Re: Script stops running with no error

2024-08-28 Thread Thomas Passin via Python-list
On 8/28/2024 8:07 PM, dn via Python-list wrote: On 29/08/24 10:32, Thomas Passin via Python-list wrote: On 8/28/2024 5:09 PM, Daniel via Python-list wrote: As you all have seen on my intro post, I am in a project using Python (which I'm learning as I go) using the wikimedia API to pull data fro

Re: Script stops running with no error

2024-08-28 Thread rbowman via Python-list
On Wed, 28 Aug 2024 22:09:56 +0100, Daniel wrote: > if definition: > print(f"\n{word_type.capitalize()}\n") > print("\n".join(definition)) > break I don't know if that was intended but the 'break' kicks you out of

Re: Script stops running with no error

2024-08-28 Thread dn via Python-list
On 29/08/24 10:32, Thomas Passin via Python-list wrote: On 8/28/2024 5:09 PM, Daniel via Python-list wrote: As you all have seen on my intro post, I am in a project using Python (which I'm learning as I go) using the wikimedia API to pull data from wiktionary.org. I want to parse the json and ou

Re: Script stops running with no error

2024-08-28 Thread Thomas Passin via Python-list
On 8/28/2024 5:09 PM, Daniel via Python-list wrote: As you all have seen on my intro post, I am in a project using Python (which I'm learning as I go) using the wikimedia API to pull data from wiktionary.org. I want to parse the json and output, for now, just the definition of the word. Wiktiona

Script stops running with no error

2024-08-28 Thread Daniel via Python-list
As you all have seen on my intro post, I am in a project using Python (which I'm learning as I go) using the wikimedia API to pull data from wiktionary.org. I want to parse the json and output, for now, just the definition of the word. Wiktionary is wikimedia's dictionary. My requirements for v1

Re: Error codes

2024-08-13 Thread Albert-Jan Roskam via Python-list
On Aug 13, 2024 15:29, Barry Scott via Python-list wrote: > Could not find file 'C:\Users\Charl\OneDrive\Documents\The Sims 4 Mod Constructor\Projects\MetalMummysMods_Ehlers-DanlosMod\Python\__pycache__\MetalMummysMods_Ehlers-DanlosMod.cpython-37.pyc'. > Element ID: (No Elem

Re: Error codes

2024-08-13 Thread Barry Scott via Python-list
> On 11 Aug 2024, at 13:06, Charlotte Plant via Python-list > wrote: > > Hiya, I'm using the sims 4 mod constructor by Zerbu, and when saving I'm > getting these error codes. > I'm going around in circles trying to figure out what is causing it, and I&

Error codes

2024-08-11 Thread Charlotte Plant via Python-list
Hiya, I'm using the sims 4 mod constructor by Zerbu, and when saving I'm getting these error codes. I'm going around in circles trying to figure out what is causing it, and I'm stuck! Can you help please? Thank you. Errors: There was an error compiling the generated Pyt

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Thomas Passin via Python-list
On 5/29/2024 10:59 AM, MRAB via Python-list wrote: On 2024-05-29 15:32, Thomas Passin via Python-list wrote: On 5/29/2024 8:55 AM, Kevin M. Wilson wrote: Please recall, I said the format for the email failed to retain the proper indents. I'll attach a picture of the code! Purpose; to uppercase

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Grant Edwards via Python-list
On 2024-05-29, Mats Wichmann via Python-list wrote: > On 5/29/24 08:02, Grant Edwards via Python-list wrote: >> On 2024-05-29, Chris Angelico via Python-list wrote: >> >>> print(f"if block {name[index]=} {index=}") >> >> Holy cow! How did I not know about the f-string {=} thing? > > It's more

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread MRAB via Python-list
On 2024-05-29 15:32, Thomas Passin via Python-list wrote: On 5/29/2024 8:55 AM, Kevin M. Wilson wrote: Please recall, I said the format for the email failed to retain the proper indents. I'll attach a picture of the code! Purpose; to uppercase every other letter in a string. Thanks all, KMW

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Barry Scott via Python-list
> On 29 May 2024, at 05:38, Kevin M. Wilson via Python-list > wrote: > > The format in this email is not of my making, should someone know, how to do > this so that it's a readable script do tell! > KMW Your mail program may have a plain-text mode to compose messages in try using that. B

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Thomas Passin via Python-list
On 5/29/2024 8:55 AM, Kevin M. Wilson wrote: Please recall, I said the format for the email failed to retain the proper indents. I'll attach a picture of the code! Purpose; to uppercase every other letter in a string. Thanks all, KMW Simpler is good, and readability is good. For a simple con

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Mats Wichmann via Python-list
On 5/29/24 08:02, Grant Edwards via Python-list wrote: On 2024-05-29, Chris Angelico via Python-list wrote: print(f"if block {name[index]=} {index=}") Holy cow! How did I not know about the f-string {=} thing? It's more recent than f-strings in general, so it's not that hard to miss. --

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Grant Edwards via Python-list
On 2024-05-29, Chris Angelico via Python-list wrote: > print(f"if block {name[index]=} {index=}") Holy cow! How did I not know about the f-string {=} thing? -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Re: Formatted Output and Argument Parsing (was: Re: Flubbed it in the second interation through the string: range error... HOW?)

2024-05-29 Thread Chris Angelico via Python-list
On Wed, 29 May 2024 at 23:06, Dan Sommers via Python-list wrote: > (For the history-impaired, getopt existed long before Python and will > likely exist long after it, but getopt's "replacement" optparse lasted > only from 2003 until 2011.) Depends on your definition of "lasted". It's not getting

Formatted Output and Argument Parsing (was: Re: Flubbed it in the second interation through the string: range error... HOW?)

2024-05-29 Thread Dan Sommers via Python-list
On 2024-05-29 at 17:14:51 +1000, Chris Angelico via Python-list wrote: > I wouldn't replace str.format() everywhere, nor would I replace > percent encoding everywhere - but in this case, I think Thomas is > correct. Not because it's 2024 (f-strings were brought in back in > 2015, so they're hardl

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Thomas Passin via Python-list
On 5/29/2024 3:14 AM, Chris Angelico via Python-list wrote: On Wed, 29 May 2024 at 16:03, Cameron Simpson via Python-list wrote: By which Thomas means stuff like this: print(f'if block {name[index]} and index {index}') Notice the leading "f'". Personally I wouldn't even go that far, jus

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread MRAB via Python-list
seif block, index is {}, letter is {}'.format(index, name))            # print('letter to lower = {}'.format(name[index]))            # print('Already lowercase do noting: name = {}'.format(name[index]))        index += 1        # index = name.upper()     return name myf

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Chris Angelico via Python-list
On Wed, 29 May 2024 at 16:03, Cameron Simpson via Python-list wrote: > By which Thomas means stuff like this: > > print(f'if block {name[index]} and index {index}') > > Notice the leading "f'". Personally I wouldn't even go that far, just: > > print('if block', name[index], 'and index',

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-28 Thread Cameron Simpson via Python-list
On 29May2024 01:14, Thomas Passin wrote: Also, it's 2024 ... time to start using f-strings (because they are more readable than str.format()) By which Thomas means stuff like this: print(f'if block {name[index]} and index {index}') Notice the leading "f'". Personally I wouldn't even go t

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-28 Thread Thomas Passin via Python-list
(name[index]))            # print('Already lowercase do noting: name = {}'.format(name[index]))        index += 1        # index = name.upper()     return name myfunc('capitalism') Error message:                        Not making sense, index is 1, letter s/b 'a'

Fw: Flubbed it in the second interation through the string: range error... HOW?

2024-05-28 Thread Kevin M. Wilson via Python-list
ubbed it in the second interation through the string: range error... HOW? The following is my effort to understand how to process a string, letter, by letter: def myfunc(name):        index = 0    howmax = len(name)    # while (index <= howmax):    while (index < howmax):        if (index % 2 ==

Flubbed it in the second interation through the string: range error... HOW?

2024-05-28 Thread Kevin M. Wilson via Python-list
e))            # print('letter to lower = {}'.format(name[index]))            # print('Already lowercase do noting: name = {}'.format(name[index]))        index += 1        # index = name.upper()             return name         myfunc('capitalism') Error mes

Can't trap paramiko runtime trace-back error

2024-05-22 Thread Vinode Singh Ujlain via Python-list
When running the code below , I get error as enumerated below. Why am I not able to trap this paramiko runtime traceback in try-except block ? Exception (client): Error reading SSH protocol banner Traceback (most recent call last):   File "/home/uzi/.local/lib/python3.8/site-packages/par

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-04-04 Thread Jacob Kruger via Python-list
he application I think I have seen this error being discussed before… A web search for pyinstaller and that error leads to people discussing why it happens it looks like. Barry -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-04-03 Thread Jacob Kruger via Python-list
eptance is versatile..." On 2024/03/31 14:51, Barry wrote: On 31 Mar 2024, at 13:24, Jacob Kruger via Python-list wrote: pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found and is required by the application I think I have seen this error being

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-04-02 Thread Barry via Python-list
ote: >>> >>> pkg_resources.DistributionNotFound: The 'altgraph' distribution was not >>> found and is required by the application >> I think I have seen this error being discussed before… >> >> A web search for pyinstaller and that error leads to people discussing why >> it happens it looks like. >> >> Barry >> >> > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-04-01 Thread Jacob Kruger via Python-list
'altgraph' distribution was not found and is required by the application I think I have seen this error being discussed before… A web search for pyinstaller and that error leads to people discussing why it happens it looks like. Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-03-31 Thread Barry via Python-list
> On 31 Mar 2024, at 13:24, Jacob Kruger via Python-list > wrote: > > pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found > and is required by the application I think I have seen this error being discussed before… A web search for pyinsta

Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-03-31 Thread Jacob Kruger via Python-list
This started happening this past week, and, while it's worked fine in the past, the moment I try to launch the pyinstaller process at all, to generate compiled output, or even if just launch it with no command line options, I receive the following error me

Re: Error in Module

2024-03-11 Thread Sanskar Mukeshbhai Joshi via Python-list
Thank you for the information. On Mon, Mar 11, 2024, 22:36 wrote: > Sanskar Mukeshbhai Joshi wrote at 2024-3-10 18:08 +: > >I had made my project in BCA in Python. When I had complete my project > and run the program, at that time I got the error in runnig my project. The

Re: Error in Module

2024-03-11 Thread Dieter Maurer via Python-list
Sanskar Mukeshbhai Joshi wrote at 2024-3-10 18:08 +: >I had made my project in BCA in Python. When I had complete my project and run >the program, at that time I got the error in runnig my project. The error was >ModuleNotFoundError: No module named 'flask'. `flask`

Re: Error in Module

2024-03-11 Thread Alan Gauld via Python-list
On 10/03/2024 18:08, Sanskar Mukeshbhai Joshi via Python-list wrote: > I had made my project in BCA in Python. When I had complete my > project and run the program, at that time I got the error in > runnig my project. The error was ModuleNotFoundError: No module named 'flask'

Error in Module

2024-03-11 Thread Sanskar Mukeshbhai Joshi via Python-list
Respected Sir/Ma'am I had made my project in BCA in Python. When I had complete my project and run the program, at that time I got the error in runnig my project. The error was ModuleNotFoundError: No module named 'flask'. I request you to check this problem and resolve it or gu

Matplotlib warning [error?] message

2024-02-19 Thread Leif Svalgaard via Python-list
now I get: File e:\getmodpot.py:40 fig,ax = initPlot() File E:\mystuff.py:272 in initPlot fig,ax = plt.subplots(figsize=(xs,ys)) File ~\anaconda3\Lib\site-packages\matplotlib\pyplot.py:1501 in subplots fig = figure(**fig_kw) File ~\anaconda3\Lib\site-packages\matplotlib\_api\d

Re: Matplotlib warning [error?] message

2024-02-19 Thread Zahraa Fadhil via Python-list
On Sunday, February 18, 2024 at 10:48:29 PM UTC+3, Leif Svalgaard wrote: > The latest[?] version of Matplotlib cannot show a figure. I get the > annoying error message: "Matplotlib is currently using agg, which is a > non-GUI backend, so cannot show the figure" > I'm

Matplotlib warning [error?] message

2024-02-18 Thread Leif Svalgaard via Python-list
The latest[?] version of Matplotlib cannot show a figure. I get the annoying error message: "Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure" I'm using Spyder python 3.11 on Windows 11. What to do? -- Leif Svalgaard l...@lei

Re: Error pd.set_option('display.width', 10000)

2024-02-03 Thread MRAB via Python-list
On 2024-02-03 23:02, gelukt gelukt via Python-list wrote: Dear, While running a code, I get the error below: What does this error mean? How can I fix this error? C:\Users\brech\Desktop\Crypto\venv\Scripts\python.exe "C:/Users/brech/Desktop/Crypto/Project/aaa Arbitrage.py" Trace

Error pd.set_option('display.width', 10000)

2024-02-03 Thread gelukt gelukt via Python-list
Dear, While running a code, I get the error below: What does this error mean? How can I fix this error? C:\Users\brech\Desktop\Crypto\venv\Scripts\python.exe "C:/Users/brech/Desktop/Crypto/Project/aaa Arbitrage.py" Traceback (most recent call last): File "C:\Users\brech\Desktop

Re: PyInstaller value error: Invalid Windows resource specifier

2023-10-30 Thread MRAB via Python-list
On 2023-10-30 19:19, McDermott Family via Python-list wrote: Hello, I am trying to create a one file executable with pyinstaller 6.1.0 and auto-py-to-exe 2.41.0 using Python version 3.10.9 in a virtual environment. Some points before the output of pinstaller is shown. My resource .py file is the

Re: error of opening Python

2023-09-29 Thread anthony.flury via Python-list
This isn't an error. This is just a normal Python Header message announcing that you are using Python 3.11.3 The rest is just information from the build system : The build Id, the date/time the build was made, and the version of the compiler. There is nothing to fix. -- Ori

Re: error of opening Python

2023-09-26 Thread Greg Ewing via Python-list
On 27/09/23 3:30 pm, Chris Roy-Smith wrote: surely running a 64 bit version of python in a 23mbit version of windows will cause significant problems! 23 millibits? I don't think you'd be able to run much at all with that few bits! :-) -- Greg -- https://mail.python.org/mailman/listinfo/python-

Re: error of opening Python

2023-09-26 Thread MRAB via Python-list
On 2023-09-27 03:30, Chris Roy-Smith via Python-list wrote: On 26/9/23 22:27, Abdelkhelk ashref salay eabakh via Python-list wrote: Dear Python team, This is my not first time using Python, I tried to launch Python and it showed I'm no expert but "Python 3.11.3 (tags/v3.11.3:f3909b8, Apr

Re: error of opening Python

2023-09-26 Thread Chris Roy-Smith via Python-list
On 26/9/23 22:27, Abdelkhelk ashref salay eabakh via Python-list wrote: Dear Python team, This is my not first time using Python, I tried to launch Python and it showed I'm no expert but "Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win surel

Re: error of opening Python

2023-09-26 Thread Michael F. Stemper via Python-list
right", "credits" or "license" for more information." I don't know what this meant and how to fix this. Could you please help me? What error did you encounter? Aside from the lack of line breaks, it looks quite similar to what I get when I start up python: Python

error of opening Python

2023-09-26 Thread Abdelkhelk ashref salay eabakh via Python-list
Dear Python team, This is my not first time using Python, I tried to launch Python and it showed "Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information." I don't know what this meant a

Re: f-string error message

2023-08-30 Thread Random832 via Python-list
On Sun, Aug 27, 2023, at 17:19, Rob Cliffe via Python-list wrote: > I understand that this is an error: I'm telling the f-string to expect > an integer when in fact I'm giving it a Decimal. > And indeed f"{x:3}" gives ' 42' whether x is an int or a Decim

f-string error message

2023-08-30 Thread Rob Cliffe via Python-list
I am currently using Python 3.11.4. First I want to say: f-strings are great!  I use them all the time, mostly but by no means exclusively for debug messages.  And in 3.12 they will get even better. And the improved error messages in Python (since 3.9) are great too!  Keep up the good work

Re: Where is the error?

2023-08-07 Thread Michael Agbenike via Python-list
When i try to open a python script it either says theres no ctk module or no pip On Sun, Aug 6, 2023, 3:51 PM Peter J. Holzer via Python-list < python-list@python.org> wrote: > Mostly, error messages got a lot better in Python 3.10, but this one had > me scratching my head for a

Re: Where is the error?

2023-08-07 Thread Cameron Simpson via Python-list
On 07Aug2023 08:02, Barry wrote: On 7 Aug 2023, at 05:28, Cameron Simpson via Python-list wrote: Used to use a Pascal compiler once which was uncannily good at suggesting where you'd missing a semicolon. Was that on DEC VMS? It was a goal at DEC for its compilers to do this well. No, a PD

Re: Where is the error?

2023-08-07 Thread Barry via Python-list
> On 7 Aug 2023, at 05:28, Cameron Simpson via Python-list > wrote: > > Used to use a Pascal compiler once which was uncannily good at suggesting > where you'd missing a semicolon. Was that on DEC VMS? It was a goal at DEC for its compilers to do this well. They could output the errors in a

Re: Where is the error?

2023-08-06 Thread Cameron Simpson via Python-list
On 06Aug2023 22:41, Peter J. Holzer wrote: Mostly, error messages got a lot better in Python 3.10, but this one had me scratching my head for a few minutes. Consider this useless and faulty script: r = { "x&quo

Re: Where is the error?

2023-08-06 Thread dn via Python-list
On 07/08/2023 08.41, Peter J. Holzer via Python-list wrote: Mostly, error messages got a lot better in Python 3.10, but this one had me scratching my head for a few minutes. ... The error message is now a lot better, of course, but the fact that it points at the expression *before* the error

Where is the error?

2023-08-06 Thread Peter J. Holzer via Python-list
Mostly, error messages got a lot better in Python 3.10, but this one had me scratching my head for a few minutes. Consider this useless and faulty script: r = { "x": (1 + 2 + 3) "y": (4 + 5 + 6)

Re: Module error

2023-05-27 Thread Thomas Passin
On 5/26/2023 8:30 PM, giuseppacef...@gmail.com wrote: I have reinstalled python which reinstalls pip. I have added the path:'C:\sers\Giuseppa\AppData\Local\Packages\PythonSoftwareFoundation.Pytho n.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts and still get the error

Re: Module error

2023-05-26 Thread MRAB
On 2023-05-27 01:30, giuseppacef...@gmail.com wrote: I have reinstalled python which reinstalls pip. I have added the path:'C:\sers\Giuseppa\AppData\Local\Packages\PythonSoftwareFoundation.Pytho n.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts and still get the error

FW: Module error

2023-05-26 Thread giuseppacefalu
: giuseppacef...@gmail.com Sent: Friday, May 26, 2023 8:31 PM To: python-list@python.org Subject: Module error I have reinstalled python which reinstalls pip. I have added the path:'C:\sers\Giuseppa\AppData\Local\Packages\PythonSoftwareFoundation.Pytho n.3.11_qbz5n2kfra8p0\LocalCache\local-pac

FW: Module error

2023-05-26 Thread giuseppacefalu
Dir(s) 378,485,805,056 bytes free From: giuseppacef...@gmail.com Sent: Friday, May 26, 2023 8:31 PM To: python-list@python.org Subject: Module error I have reinstalled python which reinstalls pip. I have added the path:'C:\sers\Giuseppa\AppData\Local\Packages\PythonSoftwareFoundation.

Module error

2023-05-26 Thread giuseppacefalu
I have reinstalled python which reinstalls pip. I have added the path:'C:\sers\Giuseppa\AppData\Local\Packages\PythonSoftwareFoundation.Pytho n.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts and still get the error below. Could you help me with this please? Traceback

Re: Error installing packages or upgrading pip

2023-05-20 Thread Mats Wichmann
ne? A really quick try shows several hits, including some StackOverflow articles. There's no way for us to judge if any of those scenarios actually would apply to your case, so suggesting you take a look first. the error I get when I try to upgrade or install a package for example pip insta

Error installing packages or upgrading pip

2023-05-18 Thread Test Only
Hi there, I hope you are in a great health I am having a problem with python even though I uninstall and reinstall it again multiple times the error I get when I try to upgrade or install a package for example pip install requests I get this error which I could not find a solution for pip

Re: Help on ImportError('Error: Reinit is forbidden')

2023-05-18 Thread Barry
PyObject* str_value = PyObject_Repr(pyExcValue); PyObject* pyExcValueStr = PyUnicode_AsEncodedString(str_value, "utf-8", "Error ~"); const char *strErrValue = PyBytes_AS_STRING(pyExcValueStr); //where   strErrValue   = "ImportError('Error: Reinit is f

Re: Help on ImportError('Error: Reinit is forbidden')

2023-05-18 Thread Jason Qian via Python-list
String(str_value, "utf-8", "Error ~"); const char **strErrValue* = PyBytes_AS_STRING(pyExcValueStr); //where *strErrValue* = "ImportError('Error: Reinit is forbidden')" ... } What we imported is a Python file which import some pyd libraries. Thanks Jason

Re: Help on ImportError('Error: Reinit is forbidden')

2023-05-18 Thread Barry
> On 17 May 2023, at 20:35, Jason Qian via Python-list > wrote: > >  Hi, > > I Need some of your help. > > I have the following C code to import *Import python.* It works 99% of > the time, but sometimes receives "*ImportError('Error: Reinit

Help on ImportError('Error: Reinit is forbidden')

2023-05-17 Thread Jason Qian via Python-list
Hi, I Need some of your help. I have the following C code to import *Import python.* It works 99% of the time, but sometimes receives "*ImportError('Error: Reinit is forbidden')*". error. **We run multiple instances of the app parallelly. *** Python version(3.7.

Re: Pip Error

2023-05-17 Thread Thomas Passin
On 5/17/2023 10:54 AM, Aysu Mammadli wrote: I encountered an error while attempting to install pip using the terminal. The exact error message I received is: "An error occurred during configuration: option use-feature: invalid choice: '2020-resolver' (choose from 'fast-deps

Re: Pip Error

2023-05-17 Thread Barry
> On 17 May 2023, at 17:26, Aysu Mammadli wrote: > > I encountered an error while attempting to install pip using the terminal. > The exact error message I received is: > > "An error occurred during configuration: option use-feature: invalid > choice: '2020-re

Pip Error

2023-05-17 Thread Aysu Mammadli
I encountered an error while attempting to install pip using the terminal. The exact error message I received is: "An error occurred during configuration: option use-feature: invalid choice: '2020-resolver' (choose from 'fast-deps', 'truststore', 'no-bi

Re: Python-pickle error

2023-05-09 Thread Tony Flury via Python-list
is my pickled object",{my_pickeld_object},) with open('file.pkl', 'rb') as file: number=pickle.load(file) my_unpickeled_object=pickle.loads(my_pickeld_object) print("this is my unpickeled object",{my_unpickeled_object},) but now i get error Traceback (most recent c

Re: How to 'ignore' an error in Python?

2023-04-29 Thread Phu Sam
3 at 04:55:41 PM, Chris Green wrote: > > > > > I'm sure I'm missing something obvious here but I can't see an > elegant > > > > > way to do this. I want to create a directory, but if it exists > it's > > > > > not an e

Re: How to 'ignore' an error in Python?

2023-04-29 Thread Chris Angelico
be I only say this because it has happened to me too many times but > before ignoring the error in the 'except' branch, I would make sure that > if the name exists it is a folder and not a file. > That's a fair consideration, although the other way to handle that is to allow

Re: How to 'ignore' an error in Python?

2023-04-29 Thread jak
Stefan Ram ha scritto: jak writes: Maybe I only say this because it has happened to me too many times but before ignoring the error in the 'except' branch, I would make sure that if the name exists it is a folder and not a file. If the name exists and it is a file's nam

Re: How to 'ignore' an error in Python?

2023-04-29 Thread Chris Angelico
us here but I can't see an elegant > > > > way to do this. I want to create a directory, but if it exists it's > > > > not an error and the code should just continue. > > > > > > > > So, I have:- > > > > > > >

Re: How to 'ignore' an error in Python?

2023-04-29 Thread jak
Chris Angelico ha scritto: Using mkdirs when you only want to make one is inviting problems of being subtly wrong, where it creates too many levels of directory. Personally, I would just do: Maybe I only say this because it has happened to me too many times but before ignoring the error in

Re: How to 'ignore' an error in Python?

2023-04-29 Thread Chris Green
Kushal Kumaran wrote: > On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote: > > I'm sure I'm missing something obvious here but I can't see an elegant > > way to do this. I want to create a directory, but if it exists it's > > not an error and the

Re: How to 'ignore' an error in Python?

2023-04-29 Thread Chris Green
ant to create a directory, but if it exists it's > > > not an error and the code should just continue. > > > > > > So, I have:- > > > > > > for dirname in listofdirs: > > > try: > > > os.mkdir(dir

Re: How to 'ignore' an error in Python?

2023-04-29 Thread Greg Ewing via Python-list
On 30/04/23 2:43 am, jak wrote: Maybe I expressed myself badly but I didn't mean to propose alternatives to the EAFP way but just to evaluate the possibility that it is not a folder. If it's not a folder, you'll find out when the next thing you try to do to it fails. You could check for it ear

RE: How to 'ignore' an error in Python?

2023-04-29 Thread avi.e.gross
require a loss of simplicity. -Original Message- From: Python-list On Behalf Of Kushal Kumaran Sent: Saturday, April 29, 2023 12:19 AM To: python-list@python.org Subject: Re: How to 'ignore' an error in Python? On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote: >

Re: How to 'ignore' an error in Python?

2023-04-28 Thread Chris Angelico
On Sat, 29 Apr 2023 at 14:27, Kushal Kumaran wrote: > > On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote: > > I'm sure I'm missing something obvious here but I can't see an elegant > > way to do this. I want to create a directory, but if it exists it'

Re: How to 'ignore' an error in Python?

2023-04-28 Thread Kushal Kumaran
On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote: > I'm sure I'm missing something obvious here but I can't see an elegant > way to do this. I want to create a directory, but if it exists it's > not an error and the code should just continue. > >

Re: How to 'ignore' an error in Python?

2023-04-28 Thread Cameron Simpson
On 28Apr2023 10:39, Mats Wichmann wrote: For this specific case, you can use os.makedirs: os.makedirs(dirname, exist_ok=True) I'm not a great fan of makedirs because it will make all the missing components, not just the final one. So as an example, if you've got a NAS mounted backup area at

Re: How to 'ignore' an error in Python?

2023-04-28 Thread Cameron Simpson
On 28Apr2023 16:55, Chris Green wrote: for dirname in listofdirs: try: os.mkdir(dirname) except FileExistsError: # so what can I do here that says 'carry on regardless' except: # handle any other error, which is reall

Re: How to 'ignore' an error in Python?

2023-04-28 Thread Mats Wichmann
On 4/28/23 11:05, MRAB wrote: On 2023-04-28 16:55, Chris Green wrote: I'm sure I'm missing something obvious here but I can't see an elegant way to do this.  I want to create a directory, but if it exists it's not an error and the code should just continue. So, I have:-

Re: How to 'ignore' an error in Python?

2023-04-28 Thread MRAB
On 2023-04-28 16:55, Chris Green wrote: I'm sure I'm missing something obvious here but I can't see an elegant way to do this. I want to create a directory, but if it exists it's not an error and the code should just continue. So, I have:- for dirname in list

Re: How to 'ignore' an error in Python?

2023-04-28 Thread Mats Wichmann
On 4/28/23 09:55, Chris Green wrote: I'm sure I'm missing something obvious here but I can't see an elegant way to do this. I want to create a directory, but if it exists it's not an error and the code should just continue. So, I have:- for dirname in list

How to 'ignore' an error in Python?

2023-04-28 Thread Chris Green
I'm sure I'm missing something obvious here but I can't see an elegant way to do this. I want to create a directory, but if it exists it's not an error and the code should just continue. So, I have:- for dirname in listofdirs: try: os.mkdir(dir

Re: Python-pickle error

2023-04-19 Thread Thomas Passin
#x27;, 'rb') as file: number=pickle.load(file) my_unpickeled_object=pickle.loads(my_pickeld_object) print("this is my unpickeled object",{my_unpickeled_object},) but now i get error Traceback (most recent call last): File "C:\Users\lukwi\Desktop\python\tester2.py

Python-pickle error

2023-04-19 Thread charles wiewiora
e: number=pickle.load(file) my_unpickeled_object=pickle.loads(my_pickeld_object) print("this is my unpickeled object",{my_unpickeled_object},) but now i get error Traceback (most recent call last): File "C:\Users\lukwi\Desktop\python\tester2.py", line 5, in with open('file.pkl

pip upgrade error

2023-04-17 Thread 羅 中勇
When I using pip list, it tells me there is a new release of pip is available, but I got these error messages when I upgrading pip. I don’t know what happened it is. PS C:\Users\USER> pip --version pip pip 23.0.1 from C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pip (pyt

Re: Python 2.7 range Function provokes a Memory Error

2023-03-06 Thread Chris Angelico
On Tue, 7 Mar 2023 at 16:53, Stephen Tucker wrote: > > Hi again, > > I tried xrange, but I got an error telling me that my integer was too big > for a C long. > > Clearly, xrange in Py2 is not capable of dealing with Python (that is, > possibly very long) integers. Th

Re: Python 2.7 range Function provokes a Memory Error

2023-03-06 Thread Stephen Tucker
Hi again, I tried xrange, but I got an error telling me that my integer was too big for a C long. Clearly, xrange in Py2 is not capable of dealing with Python (that is, possibly very long) integers. I am raising this because, (a) IF xrange in Py3 is a simple "port" from Py2, the

Re: Python 2.7 range Function provokes a Memory Error

2023-03-02 Thread Jon Ribbens via Python-list
On 2023-03-02, Stephen Tucker wrote: > The range function in Python 2.7 (and yes, I know that it is now > superseded), provokes a Memory Error when asked to deiliver a very long > list of values. > > I assume that this is because the function produces a list which it then >

Re: Python 2.7 range Function provokes a Memory Error

2023-03-02 Thread Chris Angelico
On Thu, 2 Mar 2023 at 22:27, Stephen Tucker wrote: > > Hi, > > The range function in Python 2.7 (and yes, I know that it is now > superseded), provokes a Memory Error when asked to deiliver a very long > list of values. > > I assume that this is because the function produ

Re: Python 2.7 range Function provokes a Memory Error

2023-03-02 Thread 2QdxY4RzWzUUiLuE
On 2023-03-02 at 11:25:49 +, Stephen Tucker wrote: > The range function in Python 2.7 (and yes, I know that it is now > superseded), provokes a Memory Error when asked to deiliver a very long > list of values. > > I assume that this is because the function produces a lis

  1   2   3   4   5   6   7   8   9   10   >