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

NoneType object has not attribute get #375

Open
willyd opened this issue Sep 29, 2022 · 1 comment
Open

NoneType object has not attribute get #375

willyd opened this issue Sep 29, 2022 · 1 comment

Comments

@willyd
Copy link

willyd commented Sep 29, 2022

NoneType object has not attribute get

Tensorhive works great but I get the error messages below on every startup. Everything seems to work fine. Is this something I should worry about?

INFO     | 2022-09-29 07:57:41 | MainThread                     | MSG: [⚙] Starting Vue web app with gunicorn backend                                  | FROM: tensorhive.app.web.AppServer
INFO     | 2022-09-29 07:57:41 | MainThread                     | MSG: [✔] Web App available at: http://0.0.0.0:5000                     | FROM: tensorhive.app.web.AppServer
ERROR    | 2022-09-29 07:57:41 | UsageLoggingService_Thread-4   | MSG: 'NoneType' object has no attribute 'get'                               | FROM: tensorhive.core.services.UsageLoggingService
ERROR    | 2022-09-29 07:57:41 | UsageLoggingService_Thread-4   | MSG: 'NoneType' object has no attribute 'get'                               | FROM: tensorhive.core.services.UsageLoggingService

Your environment

List relevant info:

  • Ubuntu 18.04
  • TensorHive 1.1.0
  • 1 Node with 4 GPU RTX 2080 Ti and 1 Node with 2 Titan RTX
  • Env:
alembic==1.0.3
bcrypt==3.1.7
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
Click==7.0
clickclick==20.10.2
coloredlogs==10.0
connexion==2.5.0
cryptography==3.2.1
Flask==1.1.4
Flask-Cors==3.0.9
Flask-JWT-Extended==3.13.1
gevent==21.1.2
greenlet==1.1.0
gunicorn==19.9.0
humanfriendly==9.1
idna==2.10
inflection==0.5.1
itsdangerous==1.1.0
Jinja2==2.11.3
jsonschema==2.6.0
Mako==1.1.4
MarkupSafe==1.1.1
openapi-spec-validator==0.2.9
parallel-ssh==1.9.1
paramiko==2.7.2
passlib==1.7.1
pkg-resources==0.0.0
pycparser==2.20
PyJWT==1.7.1
PyNaCl==1.4.0
python-dateutil==2.8.1
python-editor==1.0.4
python-usernames==0.2.3
PyYAML==5.3.1
requests==2.25.1
Safe==0.4
six==1.16.0
SQLAlchemy==1.3.0
SQLAlchemy-Utils==0.33.8
ssh2-python==0.26.0
stringcase==1.2.0
swagger-ui-bundle==0.0.8
tensorhive==1.1.0
urllib3==1.26.5
Werkzeug==0.16.1
zope.event==4.5.0
zope.interface==5.4.0

Steps to reproduce

  • Activate virtual environment
  • Launch tensorhive

Expected behaviour

No Error messages

Actual behaviour

Error messages corresponding to attribute error on NoneType object.

@willyd
Copy link
Author

willyd commented Sep 25, 2023

This line is causing the error:
https://github.com/roscisz/TensorHive/blob/master/tensorhive/core/services/UsageLoggingService.py#L237
Would it make sense to change it to:

# gpu_data = infrastructure[hostname].get('GPU').get(uuid)
gpu_data = infrastructure[hostname].get('GPU', {}).get(uuid)

?

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

1 participant