Skip to content
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

MacOS - Exception in thread Thread-1 (_worker_function) #333

Closed
fatihmert opened this issue Oct 16, 2023 · 1 comment
Closed

MacOS - Exception in thread Thread-1 (_worker_function) #333

fatihmert opened this issue Oct 16, 2023 · 1 comment

Comments

@fatihmert
Copy link

$ seagoat-server start ./my-app

2023-10-16 19:33:12,335 Creating server...
2023-10-16 19:33:12,337 Starting worker thread...
2023-10-16 19:33:12,343 Serving on http://0.0.0.0:53761
Exception in thread Thread-1 (_worker_function):
Traceback (most recent call last):
  File "/Users/0xfd3495/anaconda3/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/Users/0xfd3495/anaconda3/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/0xfd3495/anaconda3/lib/python3.11/site-packages/seagoat/queue/base_queue.py", line 72, in _worker_function
    context = self._get_context()
              ^^^^^^^^^^^^^^^^^^^
  File "/Users/0xfd3495/anaconda3/lib/python3.11/site-packages/seagoat/queue/task_queue.py", line 43, in _get_context
    from seagoat.engine import Engine
  File "/Users/0xfd3495/anaconda3/lib/python3.11/site-packages/seagoat/engine.py", line 42, in <module>
    nest_asyncio.apply()
  File "/Users/0xfd3495/anaconda3/lib/python3.11/site-packages/nest_asyncio.py", line 18, in apply
    loop = loop or asyncio.get_event_loop()
                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/0xfd3495/anaconda3/lib/python3.11/site-packages/nest_asyncio.py", line 45, in _get_event_loop
    loop = events.get_event_loop_policy().get_event_loop()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/0xfd3495/anaconda3/lib/python3.11/asyncio/events.py", line 677, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'Thread-1 (_worker_function)'.

Versions info;

$ sw_vers
ProductName:		macOS
ProductVersion:		14.0
BuildVersion:		23A344

$ system_profiler SPHardwareDataType | grep "Model Identifier"
Model Identifier: Mac14,7

$ python --version
Python 3.11.5

$ pip --version
pip 23.3
@kantord
Copy link
Owner

kantord commented Oct 16, 2023

Looks like it is a duplicate of this one: #243

Could you please help out at that issue by adding the same info? Also I'm curious if it's happening in all cases, or only in certain cases, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants