meta-ai-api icon indicating copy to clipboard operation
meta-ai-api copied to clipboard

Errors when running this lib via github actions.

Open jeremyjpj0916 opened this issue 1 year ago • 0 comments

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/meta_ai_api/main.py", line 108, in get_access_token
    auth_json = response.json()
                ^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/requests/models.py", line 978, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/runner/work/metaai-dailytips-socials/metaai-dailytips-socials/tips_generator.py", line 47, in generate_and_save_tips
    response = ai.prompt(message=prompt)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/meta_ai_api/main.py", line 148, in prompt
    self.access_token = self.get_access_token()
                        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/meta_ai_api/main.py", line 110, in get_access_token
    raise FacebookRegionBlocked(
meta_ai_api.exceptions.FacebookRegionBlocked: Unable to receive a valid response from Meta AI. This is likely due to your region being blocked. Try manually accessing https://www.meta.ai/ to confirm.

But github actions all execute in US so not sure why it would be blocked unless they have src ips of all github actions blacklisted:

"GitHub hosts runners in the following Azure regions: East US (eastus) East US 2 (eastus2) West US 2 (westus2)" . Do we think its IP blocked then?

jeremyjpj0916 avatar Aug 12 '24 00:08 jeremyjpj0916