This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Software Designer
Type: crash Stage: resolved
Components: C API Versions: Python 3.9
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: deepanshugarg09, josh.r, shihai1991, vstinner, willingc
Priority: normal Keywords:

Created on 2020-12-10 07:20 by deepanshugarg09, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg382816 - (view) Author: Deepanshu Garg (deepanshugarg09) Date: 2020-12-10 07:20
I am calling and executing python script from C++ code using "PyRun_SimpleFile". This API is being called from windows thread and every thread intializes and finalizes the python interpreter. However, it works fine for single thread but if intiate a request immideatly after first returned the results, it does not work.

I ttried using PyGILState_STATE as well but it caused me access violation issue and application crashed
msg382822 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2020-12-10 11:12
Hi, Thanks for your report, Deepanshu. Can you upload your code in here?

Adding victor in this bpo, MAYBE he can give some suggestions about it.
msg382929 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2020-12-13 03:13
A rough description is not sufficient. If you have code that reproduces the problem, post the reproducer so we can check, but odds are you've got a bug in your code.
msg382931 - (view) Author: Carol Willing (willingc) * (Python committer) Date: 2020-12-13 05:17
Hi @Deepanshu. I'm sorry that you are having difficulty with your script.

While we wish to be helpful, it's difficult to troubleshoot whether this is a program issue or a CPython bug. I recommend asking on Stack Overflow or the Python Discourse Users channel (

If after consulting those resources and you still believe this is a bug, please open a new issue with a more complete report which includes:
- a clear, specific title
- a concise sentence of what the bug seems to be
- what is the expected behavior
- what is the actual result
- steps to reproduce the error (or a runnable code snippet to demonstrate the behavior)

Mozilla's documentation has a good section on submitting effective bug reports (

I'm going to close this particular issue. Please do open another issue if needed. Thanks! - Carol

P.S. Josh, a gentle reminder that it's difficult to convey tone in writing. Perhaps adding a "hi" or "hello" at the start of your message would make it friendlier. Thanks for triaging too :D
Date User Action Args
2022-04-11 14:59:39adminsetgithub: 86778
2020-12-13 05:17:59willingcsetstatus: pending -> closed

nosy: + willingc
messages: + msg382931

resolution: not a bug
stage: resolved
2020-12-13 03:13:30josh.rsetstatus: open -> pending
nosy: + josh.r
messages: + msg382929

2020-12-10 11:12:59shihai1991setnosy: + shihai1991, vstinner
messages: + msg382822
2020-12-10 07:20:03deepanshugarg09create