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

Update base miner code to fix Server.serve error #1

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

tobiashomie
Copy link
Owner

This PR fixes the following error:

 Exception in thread Thread-3 (run):
2|server  | Traceback (most recent call last):
2|server  |   File "/usr/local/lib/python3.10/dist-packages/nest_asyncio.py", line 27, in run
2|server  |     loop = asyncio.get_event_loop()
2|server  |   File "/usr/local/lib/python3.10/dist-packages/nest_asyncio.py", line 45, in _get_event_loop
2|server  |     loop = events.get_event_loop_policy().get_event_loop()
2|server  |   File "/usr/lib/python3.10/asyncio/events.py", line 656, in get_event_loop
2|server  |     raise RuntimeError('There is no current event loop in thread %r.'
2|server  | RuntimeError: There is no current event loop in thread 'Thread-3 (run)'.
2|server  | During handling of the above exception, another exception occurred:
2|server  | Traceback (most recent call last):
2|server  |   File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
2|server  |     self.run()
2|server  |   File "/usr/lib/python3.10/threading.py", line 953, in run
2|server  |     self._target(*self._args, **self._kwargs)
2|server  |   File "/usr/local/lib/python3.10/dist-packages/uvicorn/server.py", line 61, in run
2|server  |     return asyncio.run(self.serve(sockets=sockets))
2|server  |   File "/usr/local/lib/python3.10/dist-packages/nest_asyncio.py", line 31, in run
2|server  |     _patch_loop(loop)
2|server  |   File "/usr/local/lib/python3.10/dist-packages/nest_asyncio.py", line 175, in _patch_loop
2|server  |     raise ValueError('Can\'t patch loop of type %s' % type(loop))
2|server  | ValueError: Can't patch loop of type <class 'uvloop.Loop'>
2|server  | /usr/lib/python3.10/threading.py:1018: RuntimeWarning: coroutine 'Server.serve' was never awaited
2|server  |   self._invoke_excepthook(self)
2|server  | RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Co-authored-by: @robertalanm

@tobiashomie
Copy link
Owner Author

@robertalanm can you please check this?

@tobiashomie tobiashomie merged commit 618b2f4 into main Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant