Add shell=True to gooey/gui/seeder.py
See original GitHub issue- MacOS 10.13.3
- Python 3 and 2
- Gooey 1.0.0
Tried to run dynamic_updates.py from the GooeyExamples repository as mentioned here. Tracebacks from Python 3 and 2 at the bottom of this.
The issue was fixed by adding , shell=True
to line 15 of gooey/gui/seeder.py
to make it look like this below:
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
Python3
Traceback (most recent call last):
File "dynamic_updates.py", line 110, in <module>
main()
File "/usr/local/lib/python3.6/site-packages/gooey/python_bindings/gooey_decorator.py", line 83, in inner2
return payload(*args, **kwargs)
File "dynamic_updates.py", line 53, in main
args = parser.parse_args()
File "/usr/local/lib/python3.6/site-packages/gooey/python_bindings/gooey_parser.py", line 113, in parse_args
return self.parser.parse_args(args, namespace)
File "/usr/local/lib/python3.6/site-packages/gooey/python_bindings/gooey_decorator.py", line 78, in run_gooey
application.run(build_spec)
File "/usr/local/lib/python3.6/site-packages/gooey/gui/application.py", line 15, in run
app = build_app(build_spec)
File "/usr/local/lib/python3.6/site-packages/gooey/gui/application.py", line 24, in build_app
gapp = GooeyApplication(merge(build_spec, imagesPaths))
File "/usr/local/lib/python3.6/site-packages/gooey/gui/containers/application.py", line 65, in __init__
self.fetchExternalUpdates()
File "/usr/local/lib/python3.6/site-packages/gooey/gui/containers/application.py", line 150, in fetchExternalUpdates
self.buildSpec['encoding']
File "/usr/local/lib/python3.6/site-packages/gooey/gui/seeder.py", line 15, in fetchDynamicProperties
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: "'/usr/local/opt/python3/bin/python3.6' -u 'dynamic_updates.py' gooey-seed-ui --ignore-gooey": "'/usr/local/opt/python3/bin/python3.6' -u 'dynamic_updates.py' gooey-seed-ui --ignore-gooey"
Python 2
Traceback (most recent call last):
File "dynamic_updates.py", line 108, in <module>
main()
File "/Library/Python/2.7/site-packages/gooey/python_bindings/gooey_decorator.py", line 83, in inner2
return payload(*args, **kwargs)
File "dynamic_updates.py", line 53, in main
args = parser.parse_args()
File "/Library/Python/2.7/site-packages/gooey/python_bindings/gooey_parser.py", line 113, in parse_args
return self.parser.parse_args(args, namespace)
File "/Library/Python/2.7/site-packages/gooey/python_bindings/gooey_decorator.py", line 78, in run_gooey
application.run(build_spec)
File "/Library/Python/2.7/site-packages/gooey/gui/application.py", line 15, in run
app = build_app(build_spec)
File "/Library/Python/2.7/site-packages/gooey/gui/application.py", line 24, in build_app
gapp = GooeyApplication(merge(build_spec, imagesPaths))
File "/Library/Python/2.7/site-packages/gooey/gui/containers/application.py", line 65, in __init__
self.fetchExternalUpdates()
File "/Library/Python/2.7/site-packages/gooey/gui/containers/application.py", line 150, in fetchExternalUpdates
self.buildSpec['encoding']
File "/Library/Python/2.7/site-packages/gooey/gui/seeder.py", line 15, in fetchDynamicProperties
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Actual meaning of 'shell=True' in subprocess - python
It's part of the Python standard library, but of course, if your shell command string is static, you can just run it once,...
Read more >A trap of shell=True in the subprocess module
When you add shell=True , and pass command line arguments as a list, only first element of the list will be executed.
Read more >shell=true with subprocess methods : r/Python
Couple questions about using the various subprocess classes and methods that accept the shell keyword argument. I understand the security concern ...
Read more >Python Pipes to Avoid Shells
A lot of the time, our codebase uses shell=True because it's convenient. The shell provides the ability to pipe things around without ...
Read more >Poetry launches wrong shell on all shells on Windows #3537
And indeed, adding shell=True to the subprocess.Popen call fixes the problem. I was able to replicate the problem simply by running. py -3 ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Howdy all,
I’ve added the ability to pass down the
shell=bool
setting from the Gooey decoratorpatch is here: https://github.com/chriskiehl/Gooey/commit/e3cb1b5a69a0c3f8024a73ec666509c2f179363f
It’ll be part of the next release.
@chriskiehl any followup? This fix is still not in the master branch