Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyinstaller --noconsole is not working #3392

Closed
skysoft999 opened this issue Mar 11, 2018 · 2 comments
Closed

Pyinstaller --noconsole is not working #3392

skysoft999 opened this issue Mar 11, 2018 · 2 comments

Comments

@skysoft999
Copy link

I am using pyinstaller to wrap my django project . I'm using sub-process library inside view.py file. I suspect because of this sub-process library i cant run application in no-console mode. What is the solution for this.?
when i remove subprocess part from views file its working as desired. I went through many discussion about this issue but since im a absolute beginner i couldn't crack solution out.
#2056

issue:

Internal Server Error: /
Traceback (most recent call last):
  File "crumbs_tableau\views.py", line 286, in parser
  File "crumbs_tableau\views.py", line 248, in mac_list
  File "subprocess.py", line 336, in check_output
  File "subprocess.py", line 403, in run
  File "subprocess.py", line 667, in __init__
  File "subprocess.py", line 905, in _get_handles
  File "subprocess.py", line 955, in _make_inheritable
OSError: [WinError 6] The handle is invalid

During handling of the above exception, another exception occurred:
@hsumerf
Copy link

hsumerf commented Dec 5, 2018

In Python 2.7 use subprocess like this:

DEVNULL = open(os.devnull,"wb")
output = subprocess.check_output(command, shell=True,stderr=DEVNULL,stdin=DEVNULL)

In Python 3 use subprocess like this:

DEVNULL = subprocess.DEVNULL
output=subprocess.check_output(command,shell=True, stderr = DEVNULL , stdin = DEVNULL )

@htgoebel
Copy link
Member

htgoebel commented Dec 6, 2018

@hsumerf Thanks for providing this solution

@htgoebel htgoebel closed this as completed Dec 6, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants