Giter Site home page Giter Site logo

Error 403 about home_assistant_tgtg HOT 9 CLOSED

chouffy avatar chouffy commented on August 15, 2024
Error 403

from home_assistant_tgtg.

Comments (9)

Chouffy avatar Chouffy commented on August 15, 2024 1

The new release should fix that, if not please reopen :)

from home_assistant_tgtg.

maartenhendrix avatar maartenhendrix commented on August 15, 2024

Probably related to Upstream ticket

from home_assistant_tgtg.

Chouffy avatar Chouffy commented on August 15, 2024

Hey @maartenhendrix thanks for your issue. Indeed it's on the upstream side, let's see if this can be corrected šŸ¤ž ahivert/tgtg-python#127

from home_assistant_tgtg.

maartenhendrix avatar maartenhendrix commented on August 15, 2024

Looks like the problem is back. Or it is a new problem. Not sure:

This error originated from a custom integration.

Logger: homeassistant.components.sensor
Source: custom_components/tgtg/sensor.py:108 
Integration: Sensor 
First occurred: 9:56:20 AM (1 occurrences) 
Last logged: 9:56:20 AM

Error while setting up tgtg platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tgtg/sensor.py", line 58, in setup_platform
    add_entities([TGTGSensor(each_item_id)])
  File "/config/custom_components/tgtg/sensor.py", line 76, in __init__
    self.update()
  File "/config/custom_components/tgtg/sensor.py", line 108, in update
    tgtg_answer = tgtg_client.get_item(item_id=self.item_id)
  File "/usr/local/lib/python3.9/site-packages/tgtg/__init__.py", line 235, in get_item
    self.login()
  File "/usr/local/lib/python3.9/site-packages/tgtg/__init__.py", line 119, in login
    self._refresh_token()
  File "/usr/local/lib/python3.9/site-packages/tgtg/__init__.py", line 109, in _refresh_token
    raise TgtgAPIError(response.status_code, response.content)
tgtg.exceptions.TgtgAPIError: (403, b'<html><head><title>apptoogoodtogo.com</title><style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style="margin:0"><p id="cmsg">Please enable JS and disable any ad blocker</p><script>var dd={\'cid\':\'AHrlqAAAAAMAXdNK6PhIKToBKhA3gReKAABmQr8Yv76uRg==\',\'hsh\':\'1D42C2CA6131C526E09F294FE96F94\',\'t\':\'fe\',\'r\':\'b\',\'s\':35560,\'host\':\'geo.captcha-delivery.com\'}</script><script src="https://ct.captcha-delivery.com/c.js"></script></body></html>\n')

from home_assistant_tgtg.

Chouffy avatar Chouffy commented on August 15, 2024

This is on the tgtg-python side of things, and it seems to have been solved some days ago: ahivert/tgtg-python#127
Can you try again with new tokens that you can create using the script?

from home_assistant_tgtg.

maartenhendrix avatar maartenhendrix commented on August 15, 2024

I will try when I get home tomorrow

from home_assistant_tgtg.

maartenhendrix avatar maartenhendrix commented on August 15, 2024

Still not working after adding new tokens:

Logger: homeassistant.components.sensor
Source: custom_components/tgtg/sensor.py:108
Integration: Sensor (documentation, issues)
First occurred: 3:13:42 PM (1 occurrences)
Last logged: 3:13:42 PM

Error while setting up tgtg platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tgtg/sensor.py", line 58, in setup_platform
    add_entities([TGTGSensor(each_item_id)])
  File "/config/custom_components/tgtg/sensor.py", line 76, in __init__
    self.update()
  File "/config/custom_components/tgtg/sensor.py", line 108, in update
    tgtg_answer = tgtg_client.get_item(item_id=self.item_id)
  File "/usr/local/lib/python3.9/site-packages/tgtg/__init__.py", line 238, in get_item
    self.login()
  File "/usr/local/lib/python3.9/site-packages/tgtg/__init__.py", line 119, in login
    self._refresh_token()
  File "/usr/local/lib/python3.9/site-packages/tgtg/__init__.py", line 109, in _refresh_token
    raise TgtgAPIError(response.status_code, response.content)
tgtg.exceptions.TgtgAPIError: (403, b'<html><head><title>apptoogoodtogo.com</title><style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style="margin:0"><p id="cmsg">Please enable JS and disable any ad blocker</p><script>var dd={\'cid\':\'AHrlqAAAAAMAQQk79rBFKPgBKhA3gReKAABmQr8Yv76uRg==\',\'hsh\':\'1D42C2CA6131C526E09F294FE96F94\',\'t\':\'fe\',\'r\':\'b\',\'s\':35560,\'host\':\'geo.captcha-delivery.com\'}</script><script src="https://ct.captcha-delivery.com/c.js"></script></body></html>\n')

from home_assistant_tgtg.

Chouffy avatar Chouffy commented on August 15, 2024

Unfortunately I cannot help a lot here, as this is an issue on the upstream module tgtg-python ... could you create an issue here?

from home_assistant_tgtg.

maartenhendrix avatar maartenhendrix commented on August 15, 2024

Okay, thanks

from home_assistant_tgtg.

Related Issues (20)

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.