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.

classification
Title: subprocess.Popen + Sqlalchemy doesn't wait for process
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, s1113950
Priority: normal Keywords:

Created on 2016-12-09 20:55 by s1113950, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg282804 - (view) Author: Steven (s1113950) Date: 2016-12-09 20:55
Called subprocess.Popen("python_file.py", shell=True).wait(), which triggered a call to `Base.metadata.create_all(engine)` inside `python_file.py`

This caused nothing after the `create_all(engine)` call to execute in `python_file.py` But, if I changed `subprocess.Popen` to `subprocess.check_call("python_file", shell=True).wait()`, the desired behavior was achieved.

I was able to continue past `create_all(engine)` if there was an error in the parent script after the subprocess call. In this case, then `python_file.py` was able to execute fully as expected.
msg382179 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-11-30 19:17
Python 2.7 is no longer maintained.

Are you seeing this issue in Python3 as well? Can you attached a script that reproduces the problem? (A script is always better than a verbal description). Information about the system on which you observed the issue can also be helpful.
msg386947 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-02-14 12:48
There isn't enough information here to understand what the issue is.

If you are still having this issue in Python 3, please create a new ticket with code to reproduce it and information about the system you are using.
History
Date User Action Args
2022-04-11 14:58:40adminsetgithub: 73112
2021-02-14 12:48:20iritkatrielsetstatus: pending -> closed
resolution: rejected
messages: + msg386947

stage: resolved
2020-11-30 19:17:16iritkatrielsetstatus: open -> pending
nosy: + iritkatriel
messages: + msg382179

2016-12-09 20:55:37s1113950create