2 votes

could not determine name for option @ click.option

I am working with click in python click, but it shows me that it cannot determine the option, which I am actually assigning

 import click

import samsara
from samsara.apis import SamsaraClient


@click.command()
@click.option('xxxxxxxxxxxxxxxxx', type=str, required=True)
@click.option('490', type=int, required=True)

def get_sensors(access_token, group_id):
    # Create an instance of the SamsaraClient.
    client = SamsaraClient()
    # Get GPS locations for vehicles in the group.
    response = client.get_fleet_locations(access_token,samsara.GroupParam(group_id))

    for vehicle in response.vehicles:
        print ('\nvehicle ID: {}, name: {}, (lat, long): ({}, {}), time:{}'
            .format(vehicle.id, vehicle.name, vehicle.latitude,
                   vehicle.longitude, vehicle.time))


if __name__ == "__main__":
    get_sensors

in the option where the error marks me is

 @click.option('490', type=int, required=True)

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X