esitarski / CrossMgr

Cyclo Cross Management Application
MIT License
41 stars 20 forks source link

SeriesMgr crashes on loading race under Windows #108

Closed kimble4 closed 1 year ago

kimble4 commented 1 year ago

With SeriesMgr v3.1.17-20230307120939, running on Windows 11:

When I attempt to load a race (or load a .smn containing races), it crashes with the following unhelpful error:

Traceback (most recent call last):
  File "SeriesMgr.pyw", line 3, in <module>
  File "MainWin.py", line 961, in MainLoop
  File "argparse.py", line 1829, in parse_args
  File "argparse.py", line 2585, in error
  File "argparse.py", line 2555, in print_usage
  File "argparse.py", line 2566, in _print_message
AttributeError: 'NoneType' object has no attribute 'write'

Crucially, I'm not seeing this problem when running from source on Linux.

This is presumably related to the recent changes to read the races in parallel...

esitarski commented 1 year ago

This should now be fixed. The issue is that Window needs a call to multiprocessor.freeze_support() (see here https://stackoverflow.com/questions/46335842/python-multiprocessing-throws-error-with-argparse-and-pyinstaller for details).

On Mon, Mar 13, 2023 at 12:48 PM Kim Wall @.***> wrote:

With SeriesMgr v3.1.17-20230307120939, running on Windows 11:

When I attempt to load a race (or load a .smn containing races), it crashes with the following unhelpful error:

Traceback (most recent call last): File "SeriesMgr.pyw", line 3, in File "MainWin.py", line 961, in MainLoop File "argparse.py", line 1829, in parse_args File "argparse.py", line 2585, in error File "argparse.py", line 2555, in print_usage File "argparse.py", line 2566, in _print_message AttributeError: 'NoneType' object has no attribute 'write'

Crucially, I'm not seeing this problem when running from source on Linux.

This is presumably related to the recent changes to read the races in parallel...

— Reply to this email directly, view it on GitHub https://github.com/esitarski/CrossMgr/issues/108, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABGXKOEX4PBTDGGZUZWWRTW35FWRANCNFSM6AAAAAAVZKUJ7Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Edward Sitarski

kimble4 commented 1 year ago

Yep, that's fixed it for me.