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

Fix: AttributeError when self.vm == None #531

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Fix: AttributeError when self.vm == None #531

merged 1 commit into from
Feb 2, 2024

Conversation

hoh
Copy link
Member

@hoh hoh commented Feb 2, 2024

Fixes the following error, reported by node operators.

task: <Task finished name='Task-1' coro=<_run_app() done, defined at /usr/lib/python3/dist-packages/aiohttp/web.py:287> exception=AttributeError("'NoneType' object has no attribute 'to_dict'")>
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/aiohttp/web.py", line 431, in _run_app
    await asyncio.sleep(delay)
  File "/usr/lib/python3.10/asyncio/tasks.py", line 605, in sleep
    return await future
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/aiohttp/web.py", line 433, in _run_app
    await runner.cleanup()
  File "/opt/aleph-vm/aleph/vm/models.py", line 234, in stop
    await self.record_usage()
  File "/opt/aleph-vm/aleph/vm/models.py", line 275, in record_usage
    pid_info = self.vm.to_dict()
AttributeError: 'NoneType' object has no attribute 'to_dict'

Fixes the following error, reported by node operators.

```
task: <Task finished name='Task-1' coro=<_run_app() done, defined at /usr/lib/python3/dist-packages/aiohttp/web.py:287> exception=AttributeError("'NoneType' object has no attribute 'to_dict'")>
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/aiohttp/web.py", line 431, in _run_app
    await asyncio.sleep(delay)
  File "/usr/lib/python3.10/asyncio/tasks.py", line 605, in sleep
    return await future
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/aiohttp/web.py", line 433, in _run_app
    await runner.cleanup()
  File "/opt/aleph-vm/aleph/vm/models.py", line 234, in stop
    await self.record_usage()
  File "/opt/aleph-vm/aleph/vm/models.py", line 275, in record_usage
    pid_info = self.vm.to_dict()
AttributeError: 'NoneType' object has no attribute 'to_dict'
```
Copy link

github-actions bot commented Feb 2, 2024

Failed to retrieve llama text: HTTPConnectionPool(host='46.255.204.205', port=5100): Max retries exceeded with url: /completion (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a66264490>: Failed to establish a new connection: [Errno 111] Connection refused'))

@hoh hoh merged commit 55c49fa into main Feb 2, 2024
19 checks passed
@Psycojoker Psycojoker deleted the hoh-fix-vm-none branch July 24, 2024 15:39
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

Successfully merging this pull request may close these issues.

2 participants