n0bel / PiClock

A Fancy Clock built around a monitor and a Raspberry Pi
MIT License
566 stars 182 forks source link

Climacell PiClock KeyErrors #194

Closed BertLindeman closed 3 years ago

BertLindeman commented 3 years ago

Took a new clone from git Updated the config and api Only 1 key in ApiKeys.py: ccapi for ClimaCell.co

updated python-dateutil and tzlocal

Now get KeyErrors in the log. Added a few prints in the hope that is makes clear why. Current log:

('DEBUG 768 wxdata2:\n', {u'message': u'You cannot consume this service'})
Traceback (most recent call last):
  File "PyQtPiClock.py", line 772, in wxfinished_cc2
    f = wxdata2[i * 3 + 2]
KeyError: 2
('DEBUG 683 tzlocal.get_localzone():', <DstTzInfo 'Europe/Amsterdam' LMT+0:20:00 STD>)
Traceback (most recent call last):
  File "PyQtPiClock.py", line 685, in wxfinished_cc
    f['observation_time']['value'])
KeyError: 'observation_time'
('DEBUG 830 wxdata3:', {u'message': u'You cannot consume this service'})
Traceback (most recent call last):
  File "PyQtPiClock.py", line 835, in wxfinished_cc3
    wxdata3[0]['observation_time']['value']+"T00:00:00Z")
KeyError: 0

The line numbers are the original line numbers where the error was reported,

Switched back to DarkSky for a while and there the KeyErrors did not occur,

Any idea where I should look for to further debug this?

n0bel commented 3 years ago

"You cannot consume this service" is caused by a problem with your apikey or with the api. The log file should show the full URL that is being used. Check that URL in your browser. Double check the key.

n0bel commented 3 years ago

I've also done an update for some day/night issues. You should pull it again.

BertLindeman commented 3 years ago

I've also done an update for some day/night issues. You should pull it again.

Thank you.

Will do (both) and report back

ScottChapman commented 3 years ago

merry xmas?

Knackster commented 3 years ago

Merry Christmas and Happy New Year

On Fri, Dec 25, 2020, 9:33 AM Scott Chapman notifications@github.com wrote:

merry xmas?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/n0bel/PiClock/issues/194#issuecomment-751263785, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFIERVAQK5KR4JSZFRNXYR3SWSWF7ANCNFSM4VJFTVTA .

BertLindeman commented 3 years ago

Sorry @ScottChapman Merry Xmas and a safe, healthy, happy and joyable 2021 to all

image

BertLindeman commented 3 years ago

Something in the sign-up procedure did not go well. Climacell support is working on it (Even on Xmas) Good support I'd say. Closing as this is not a PiClock issue.

merry xmas?

BertLindeman commented 3 years ago

The api-key I got is a V4 key and that does not work on V3. And support states that you cannot get a V3 key if you have a V4 key.

Support at Climacell writes to me: we are deprecating v3 in a few weeks. V4 is the way to go.

` The call you are making is for V3. this page should should you how to format the V4 call. it is a bit different:

https://docs.climacell.co/reference/get-timelines `

Should I enter a new issue: Convert Climacell V3 calls into V4?

BertLindeman commented 3 years ago

Issue #195 has been made, so re-close this one