Open vxgmichel opened 2 years ago
Yikes! This is buggy argument passing to a Python function and your patch looks like the right fix. I'll commit a fix next time I sit down to hack on PyOxidizer.
Thanks for the bug report and the investigation! (I wish we had better test coverage of multiprocessing
functionality: there have been few bugs in it!)
Ran into this myself recently.
spawn_module.getattr("spawn_main")?.call((), Some(kwargs))?;
This is awesome. I forked and gave this a try and am able to do what I wanted to do with multiprocessing spawn Thanks!
While messing with the multiprocessing
spawn
start method on linux, I got this error:Even though I read in the docs that:
.., I noticed what seems to be a bug in MainPythonInterpreter::run_multiprocessing:
https://github.com/indygreg/PyOxidizer/blob/e063d3d6a9519e1b10e35b5117392cd9980de0fe/pyembed/src/interpreter.rs#L563
This effectively calls
spawn_main(kwargs)
. Shouldn't this bespawn_main(**kwargs)
instead?I built the project with this diff and it seems to fix my issue: