Skip to content

issue setting up fleet api -- unable to refresh token and TypeError: 'NoneType' #198

@permezel

Description

@permezel

I am trying to get the fleetAPI working for the dashboard. I ran ./setup.sh once, entered all my data, and due to the docker install screwing up the default routes (everything routes to docker veth devices) it blew up trying to get the key data.
Rebooted, and manually pruned the bogus default routes so that connectivity restored, re-ran ./setup.sh, and now it blows up here.

pyPowerwall [0.13.2] - FleetAPI Mode Setup

Unable to refresh token. Response code: 400
Token expired, refresh token failed
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.10/site-packages/pypowerwall/__main__.py", line 110, in <module>
    c = PyPowerwallFleetAPI(None, authpath=authpath)
  File "/usr/local/lib/python3.10/site-packages/pypowerwall/fleetapi/pypowerwall_fleetapi.py", line 75, in __init__
    self.fleet = FleetAPI(configfile=self.configfile, site_id=self.siteid,
  File "/usr/local/lib/python3.10/site-packages/pypowerwall/fleetapi/fleetapi.py", line 109, in __init__
    self.load_config()
  File "/usr/local/lib/python3.10/site-packages/pypowerwall/fleetapi/fleetapi.py", line 144, in load_config
    self.site_id = sites[0]['energy_site_id']
TypeError: 'NoneType' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions