-
Notifications
You must be signed in to change notification settings - Fork 11
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
Unexpected error fetching sensor data: 'int' object has no attribute 'text' #24
Comments
See #25 |
if found: Hvis det er denne som skal tilføres.. ?? |
Denne del (fuelprices_dk_parsers.py, linje 129): if found:
priceSegments = cells[2].findAll(
"span", style=["text-align:right;", "text-align:left;"]
)
products[productKey] = self._addPriceToProduct(
productDict,
priceSegments[0].text + "." + priceSegments[1].text,
) Skal erstattes med: if found:
products[productKey] = self._addPriceToProduct(
productDict,
cells[2].text,
) Vent evt. til at denne PR bliver indlæst i koden af @J-Lindvig |
Med den ændre som du har skrevet, for jeg den fejl som også jeg har skrevet Unexpected error fetching sensor data: 'int' object has no attribute 'text' |
Could you check, if you have changed these also? circlek changed the titles of their products. |
Den har jeg også lavet. |
Jeg kan se, at Shell har ændret deres hjemmeside. Jeg vil formode, at hvis du fjerner |
Hvis jeg sætter Shell ind som companies under configuration.yaml for jeg stadig at de alle sammen er utilgængelig og sammen fejl i loggen |
Du burde egentlig fjerne Min ser f.eks. sådan ud og giver ikke fejl eller fuelprices_dk:
update_interval: 30
companies:
- circlek
- f24
- goon
- ingo
- oil
- ok
- q8
fueltypes:
- oktan 95 |
Jeg havde ikke skrevet noget under companies.. Så min var bar tom.. det var det der skulle til.. Og den kommer heller ikke med fejl i loggen. jeg siger mange tak for hjælpen |
Unexpected error fetching sensor data: 'int' object has no attribute 'text'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 293, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 248, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fuelprices_dk/sensor.py", line 39, in async_update_data
await hass.async_add_executor_job(company.refreshPrices)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fuelprices_dk/fuelprices_dk_api.py", line 202, in refreshPrices
self._products = getattr(self._parser, self._key)(self._url, self._products)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fuelprices_dk/fuelprices_dk_parsers.py", line 93, in shell
return self._getDataFromTable(url, products, 0, -1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fuelprices_dk/fuelprices_dk_parsers.py", line 202, in _getDataFromTable
html = self._get_html_soup(r)
^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fuelprices_dk/fuelprices_dk_parsers.py", line 197, in _get_html_soup
if r.text:
^^^^^^
AttributeError: 'int' object has no attribute 'text'
The text was updated successfully, but these errors were encountered: