Skip to content

Coalition DB ID not found in HOG #903

Open
@ArneTR

Description

@ArneTR

When submitting PowerHog data to the API this error occurs:

green-coding-gunicorn-container  |   File "/var/www/startup/venv/lib/python3.12/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
green-coding-gunicorn-container  |     return await dependant.call(**values)
green-coding-gunicorn-container  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
green-coding-gunicorn-container  |   File "/var/www/green-metrics-tool/api/main.py", line 806, in hog_add
green-coding-gunicorn-container  |     coaltion_db_id = DB().fetch_one(query=query, params=params)[0]
green-coding-gunicorn-container  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
green-coding-gunicorn-container  |   File "/var/www/green-metrics-tool/lib/db.py", line 66, in fetch_one
green-coding-gunicorn-container  |     return self.__query(query, params=params, return_type='one', fetch_mode=fetch_mode)
green-coding-gunicorn-container  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
green-coding-gunicorn-container  |   File "/var/www/green-metrics-tool/lib/db.py", line 51, in __query
green-coding-gunicorn-container  |     cur.execute(query, params)
green-coding-gunicorn-container  |   File "/var/www/startup/venv/lib/python3.12/site-packages/psycopg/cursor.py", line 97, in execute
green-coding-gunicorn-container  |     raise ex.with_traceback(None)
green-coding-gunicorn-container  | psycopg.errors.NumericValueOutOfRange: bigint out of range
green-coding-gunicorn-container  |
green-coding-gunicorn-container  |
green-coding-gunicorn-container  | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 0_o >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
green-coding-gunicorn-container  |
green-coding-gunicorn-container  | Error: Error in API call - catch_exceptions_middleware
green-coding-gunicorn-container  |
green-coding-gunicorn-container  | Url (<class 'starlette.datastructures.URL'>): http://api.green-coding.io/v1/hog/add
green-coding-gunicorn-container  | Query_params (<class 'starlette.datastructures.QueryParams'>):
green-coding-gunicorn-container  | Client (<class 'NoneType'>): None
green-coding-gunicorn-container  | Headers (<class 'starlette.datastructures.Headers'>): Headers({'host': 'api.green-coding.io', 'x-real-ip': '172.18.0.1', 'x-forwarded-for': '2003:fb:7f1a:f300:995d:69d6:9dec:a908, 172.18.0.1', 'x-forwarded-proto': 'http', 'connection': 'close', 'content-length': '436382', 'accept-encoding': 'gzip, br', 'cf-ray': '8c3ee62afd3c4369-EWR', 'cf-visitor': '{"scheme":"https"}', 'user-agent': 'Python-urllib/3.8', 'content-type': 'application/json', 'cf-connecting-ip': '2003:fb:7f1a:f300:995d:69d6:9dec:a908', 'cdn-loop': 'cloudflare; loops=1', 'cf-ipcountry': 'DE'})
green-coding-gunicorn-container  | Body (<class 'bytes'>): b'[{"time": 1722538613000, "data": "eJzsvWtvK0eWLfhXDvypL8Z ...

@ribalba What further data do you need to inspect the problem?

Currently I have turned the API endpoint off again. We need to chat if I shall reactivate some stuff.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions