Open affan-hussain opened 7 months ago
Looks like it's because pip's output is too big to put in the buffer. A proper fix would involve rewriting this with child_process.spawn()
(https://stackoverflow.com/questions/63796633/spawnsync-bin-sh-enobufs) but a workaround is to just give a larger buffer to exec
:
diff --git a/packages/pyright-scip/src/virtualenv/environment.ts b/packages/pyright-scip/src/virtualenv/environment.ts
index 802ba9f8d..1abd0178b 100644
--- a/packages/pyright-scip/src/virtualenv/environment.ts
+++ b/packages/pyright-scip/src/virtualenv/environment.ts
@@ -29,13 +29,13 @@ let getPipCommand = () => {
};
function pipList(): PipInformation[] {
- return JSON.parse(child_process.execSync(`${getPipCommand()} list --format=json`).toString()) as PipInformation[];
+ return JSON.parse(child_process.execSync(`${getPipCommand()} list --format=json`, { maxBuffer: 1024*1024*5 }).toString()) as PipInformation[];
}
function pipBulkShow(names: string[]): string[] {
// TODO: This probably breaks with enough names. Should batch them into 512 or whatever the max for bash would be
return child_process
- .execSync(`${getPipCommand()} show -f ${names.join(' ')}`)
+ .execSync(`${getPipCommand()} show -f ${names.join(' ')}`, { maxBuffer: 1024*1024*5 })
.toString()
.split('\n---');
}
I'm running into this as well. Any workarounds? I'm wiping my venv but let me know if there's a better way.
I'm facing the same issue , any updates on this?
Hey folks! I'm just trying out SCIP for the first time. I wanted to try running it on my python repo and used the command
scip-python index .
and it is consistenly failing. Runningpip3 show -f
on the CLI works fine.