New submission from Steven:

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.

----------
components: Library (Lib)
messages: 282804
nosy: s1113950
priority: normal
severity: normal
status: open
title: subprocess.Popen + Sqlalchemy doesn't wait for process
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28926>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to