Giter VIP home page Giter VIP logo

cardiffwaste-ha's Introduction

About Me

๐Ÿ”ญ By day I am a physicist working on Kinetic Inductance Detectors and Cryogenics at Cardiff University, I lead the cryogenics work on the MUSCAT instrument on the LMT.

๐Ÿš Outside work you will find me playing around on Open Source projects including Home Assistant

๐Ÿ“ซ @tombrien or @tbrien88 most places

๐Ÿ˜„ Pronouns: He/Him

cardiffwaste-ha's People

Contributors

dependabot[bot] avatar inverse avatar tombrien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cardiffwaste-ha's Issues

Handle None JWT response

2022-03-09 13:08:40 DEBUG (SyncWorker_1) [cardiffwaste.cardiffwaste] Starting sorting bins
2022-03-09 13:08:40 DEBUG (SyncWorker_1) [cardiffwaste.cardiffwaste] Requesting JWT
2022-03-09 13:08:40 DEBUG (SyncWorker_1) [cardiffwaste.cardiffwaste] Completed JWT request with status code: 200
2022-03-09 13:08:40 ERROR (MainThread) [custom_components.cardiffwaste] Unexpected error fetching cardiffwaste data: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/cardiffwaste/__init__.py", line 111, in _async_update_data
return await self._hass.async_add_executor_job(
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/cardiffwaste/cardiffwaste.py", line 201, in get_next_collections
response = self.get_raw_collections()
File "/usr/local/lib/python3.9/site-packages/cardiffwaste/cardiffwaste.py", line 145, in get_raw_collections
jwt = _get_token(self._user_agent)
File "/usr/local/lib/python3.9/site-packages/cardiffwaste/cardiffwaste.py", line 50, in _get_token
result = json.loads(xml.find("GetJWTResult").get_text())
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2022-03-09 13:08:40 DEBUG (MainThread) [custom_components.cardiffwaste] Finished fetching cardiffwaste data in 0.274 seconds (success: False)

Error: Config flow could not be loaded

Trying to add this integration as per the instructions in the README but I repeatedly get the error "Config flow could not be loaded". Tried restarting the server and trying again but it didn't help

Logger: homeassistant.config_entries
Source: config_entries.py:711
First occurred: 18:09:02 (1 occurrences)
Last logged: 18:09:02

Error occurred loading configuration flow for integration cardiffwaste: cannot import name 'Platform' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

Just thanks

Hi Tom,
Just wanted to say thank you for sharing this.
Great work! Cheers!

Handle empty cookie jar

2022-03-09 12:08:40 DEBUG (SyncWorker_1) [cardiffwaste.cardiffwaste] Starting sorting bins
2022-03-09 12:08:40 DEBUG (SyncWorker_1) [cardiffwaste.cardiffwaste] Requesting JWT
2022-03-09 12:08:40 DEBUG (SyncWorker_1) [cardiffwaste.cardiffwaste] Completed JWT request with status code: 200
2022-03-09 12:08:40 DEBUG (SyncWorker_1) [cardiffwaste.cardiffwaste] Attempting to get collection cookies
2022-03-09 12:08:40 DEBUG (SyncWorker_1) [cardiffwaste.cardiffwaste] Received 0 cookies
2022-03-09 12:08:40 DEBUG (SyncWorker_1) [cardiffwaste.cardiffwaste] Attempting to get collection data
2022-03-09 12:08:40 DEBUG (SyncWorker_1) [cardiffwaste.cardiffwaste] Completed collection data request with status code: 502
2022-03-09 12:08:40 ERROR (MainThread) [custom_components.cardiffwaste] Unexpected error fetching cardiffwaste data: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/cardiffwaste/__init__.py", line 111, in _async_update_data
return await self._hass.async_add_executor_job(
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/cardiffwaste/cardiffwaste.py", line 201, in get_next_collections
response = self.get_raw_collections()
File "/usr/local/lib/python3.9/site-packages/cardiffwaste/cardiffwaste.py", line 166, in get_raw_collections
raw["collections"] = json.loads(response.text)["collectionWeeks"]
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.