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

gbfs_nextbike_vehicle_availabilities fails #91

Open
ThorstenFroehlinghaus opened this issue Jul 8, 2024 · 0 comments
Open

gbfs_nextbike_vehicle_availabilities fails #91

ThorstenFroehlinghaus opened this issue Jul 8, 2024 · 0 comments
Assignees

Comments

@ThorstenFroehlinghaus
Copy link
Member

The ipl-transformer-proxy-1 logs shows this for several nextbike feeds:

[05:20:57.897] Addon error: list index out of range
Traceback (most recent call last):
File "/app/app/app.py", line 67, in response
json_data = json_converter.convert(data=json_data, path=flow.request.path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/converters/gbfs_nextbike_vehicle_availabilities.py", line 44, in convert
return self._convert_station_status(system_id, data, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/converters/gbfs_nextbike_vehicle_availabilities.py", line 63, in _convert_station_status
update_stations_availability_status(data['data']['stations'], vehicles)
File "/app/app/utils/gbfs_util.py", line 44, in update_stations_availability_status
default_vehicle_types_available = [{'vehicle_type_id': vehicles[0]['vehicle_type_id'], 'count': 0}]
~~~~~~~~^^^
IndexError: list index out of range
172.28.5.14:54564: GET https://gbfs.nextbike.net/maps/gbfs/v2/nextbike_vn/de/s…
<< 200 OK 2.8k
172.28.5.14:54552: GET https://stables.donkey.bike/api/public/gbfs/2/donkey_th…
<< 200 OK 704b
....

This might be the reason for the following validation messages:

        "station_status": {
            "file": "station_status",
            "required": false,
            "exists": true,
            "errorsCount": 344,
            "version": "2.3",
            "errors": [
                {
                    "schemaPath": "#/properties/data/properties/stations/items",
                    "violationPath": "#/data/stations/0",
                    "message": "#/data/stations/0: required key [vehicle_types_available] not found"
                },
                {
                    "schemaPath": "#/properties/data/properties/stations/items",
                    "violationPath": "#/data/stations/1",
                    "message": "#/data/stations/1: required key [vehicle_types_available] not found"
                },

...

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