-
Notifications
You must be signed in to change notification settings - Fork 792
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
Exception when multiple processes access COM objects with the same interface #1600
Comments
SReicheltPTV
added a commit
to SReicheltPTV/pywin32
that referenced
this issue
Oct 26, 2020
SReicheltPTV
added a commit
to SReicheltPTV/pywin32
that referenced
this issue
Oct 26, 2020
mhammond
pushed a commit
that referenced
this issue
Oct 26, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When multiple processes access COM interfaces from Python, generating and importing modules for these interfaces sometimes fails. The effect is similar to #1595, but in contrast to that bug, it can be reproduced with a debugger as follows:
gen_py
folder.EnsureDispatch
:finish_writer
ingenpy.py
.Now the second script will try to write to the same temporary file as the first, which will fail.
So the second script should use a separate temporary file, but then
genpy.py
also needs to cope with the situation that the module has already been generated in the meantime.Note that this it is not necessary for both scripts to access the same COM server; they merely need to access COM servers with the same interface. For this reason, we ran into this problem somewhat frequently when running tests in parallel, until we pre-generated everything using
makepy
.This is actually an old problem that affects all versions of pywin32. Will submit a PR.
The text was updated successfully, but these errors were encountered: