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
Circular import while using pydicom with multiprocessing #1737
Comments
This is difficult to address without a reproducible bit of code. It seems that it only happens with multiprocessing, because we have no reports of circular imports otherwise, and the test suite has very high coverage. Howeer, pydicom does have a couple/few imports that are buried inside functions to avoid circular import; perhaps those don't work under multiprocessing for some reason. Your environment says pydicom 2.1. Have you tried with pydicom 2.3? I'm not aware of any specific changes that might affect this, but just in case. |
We went back to pydicom 2.1 because the circular import happened way more frequently with 2.3. I'll keep trying to reproduce the bug in a simple way. |
It seems the issue came from the serialization when passing pydicom objects in multiprocessing queues. |
Do you still think that this is something that |
It would be great if pydicom could be used in multiprocessing context and passing values into queues. |
Do you now have a reproducible example so we can investigate this? |
No I could not find a stable way to reproduce this bug, one engineer had the issue at each run of our app, so we were able to confirm that it improved things, but we could not find a simple reproductible example. |
Describe the bug
When importing pydicom with a multi process program, a circular import happens.
The stack trace is the following:
The error occurs in multiple process, sometimes with the following:
Expected behavior
The import should take place without error.
Steps To Reproduce
The bug is hard to reproduce, I'm using a library that I can't share, but we only do a import
pydicom
.I have not been able to reproduce the bug in a simple way for it to happen every time, it can be random or occur every time when changing an unrelated file.
If anyone has an idea to reproduce it, I'm willing to try.
Your environment
The text was updated successfully, but these errors were encountered: