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

subprocess.popen throws "File name too long" on Mac #18

Open
jseabold opened this issue Apr 3, 2020 · 4 comments
Open

subprocess.popen throws "File name too long" on Mac #18

jseabold opened this issue Apr 3, 2020 · 4 comments

Comments

@jseabold
Copy link

jseabold commented Apr 3, 2020

If I pass a longer query through, I get an OSError: [Errno 63] File name too long: <redacted bcp command>. Adding a shell=True to subprocess.run fixes things, but I don't recall all the details of subprocess to remember if this is a general solution.

@jseabold
Copy link
Author

jseabold commented Apr 3, 2020

Using the MSSQL driver.

@mikealfare
Copy link
Member

I'll have to research that one more. My understanding was that setting shell=True was a potential vulnerability, but don't hold me to that.

@mikealfare
Copy link
Member

It looks like it can open security vulnerabilities, so I'd rather not introduce that. Is it possible to move the default directory to a higher level directory? When I write out to %USERPROFILE% (the default) in Windows, it doesn't seem to have a problem.

@jseabold
Copy link
Author

jseabold commented Apr 3, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants