Documentation Suggestion re: concurrent.futures #67
First off- thanks again for this project! I've been using it a ton and I really appreciate you taking the time to put it together.
I'm opening this issue to share a minor hurdle I came across today which only came up after packaging my project. The issue has nothing to do with auto-py-to-exe as it turns out, but the fix was so easy that I'm hoping by posting the solution here it may help out someone else with a similar problem.
If the script(s) you're packaging use concurrent.futures for any multi-threading/processing then you'll want to add the following to your imports:
from multiprocessing import freeze_support
and this to your main:
Before adding this I kept getting errors re: concurrent.futures when trying to run the packaged project, even when everything worked fine before packaging it. After some troubleshooting/Googling I came across this StackOverflow entry which led me to this bug report (see the second entry by Torsten Landschoff.)
After making the minor change, my project ran without issue as a one-file .exe.
This is a pretty specific use-case, so I'm uncertain if it would be helpful to add this to the documentation as a "pro-tip" (if at all considering the root cause wasn't auto-py-to-exe.) I figured I might as well bring it up either way- if you'd like me to add it somewhere and submit a pull request I'd be happy to do so.
Oh wow, that's something I have not come across before, thanks for pointing this out!
I think the best way to address this would be to add it to the help post I've been adding to which is linked at the bottom of the UI after every build. I know adding this to the user's script is an option but I am not too keen on directly manipulating a user's program as it could cause other side effects.
I'll close this issue when I get some time to add it; thank you very much!