Skip to content

Commit

Permalink
Fix RunTimeWarning (#3028)
Browse files Browse the repository at this point in the history
Set default event_loop_policy as suggested in the warning message

#3027
  • Loading branch information
ptsavol authored Dec 20, 2024
1 parent 7a70978 commit 16db303
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spinetoolbox/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"""Provides the main() function."""
import multiprocessing
import os
import asyncio
import PySide6

dirname = os.path.dirname(PySide6.__file__)
Expand All @@ -39,6 +40,8 @@
def main():
"""Creates main window GUI and starts main event loop."""
multiprocessing.freeze_support()
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
logging.basicConfig(
stream=sys.stderr,
level=logging.DEBUG,
Expand Down

0 comments on commit 16db303

Please sign in to comment.