I don't know how else to interpret the error besides my URL is wrong, but I already copy & paste directly from the Sheety dashboard and doesn't work, copy & paste directly from the secrets seccion in Replit and doesn't work either.
I'm sure it is the correct URL and the code works in Replit and it does not work here.
import os
import requests
from dotenv import load_dotenv
class DataManager:
def __init__(self) -> None:
load_dotenv()
self.sheety_url = os.getenv('SHEETY_URL')
sheety_header = {
'Authorization': os.getenv('SHEETY_AUTH')
}
response = requests.get(url=self.sheety_url, headers=sheety_header)
response.raise_for_status()
self.sheet_data = response.json()
For a moment I thought I was doing something wrong with the dotenv library, but when I print in console the variable type it shows it is a class 'str' and when I print the variable itself shows the URL complete and correct.
Is there something else I have to change in my code because I'm using a different service?