Has anyone received such error when using API to download the data?

Has anyone received such error when using API to download the data?

TypeError: 'TransportServerError' object is not subscriptable
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fa6b7eace50>

Mind sharing your query? That will help us look further into the issue. cc: @vchen

import safegraphql.client as sgql
sgql_client = sgql.HTTP_Client(apikey = 'mykey')
placekey_df = pd.read_csv("somefile.csv")
keys = placekey_df['placekey'].tolist()
cols = ["placekey",
        "parent_placekey",
        "region",
        "postal_code",
        "location_name",
        "date_range_start",
        "date_range_end",
        "raw_visit_counts",
        "raw_visitor_counts"
        ]
date_list = [str(x)[:10] for x in pd.date_range(start="2019-01-01", end="2022-01-01", freq='W')]
current_df = sgql_client.lookup(product = 'weekly_patterns', placekeys = keys, columns = cols, date = date_list)

hi cathy, it might be timing out. can you try to run the request directly from graphql instead of using the library? here is an example of how to pass in the graphql query and run it over the requests lib Find all stores | SafeGraph API

Hi Victor, I’ve also tried with the graphQL, and it did not work. When I tried to print the r_json, it gives

{'message': 'API rate limit exceeded'}

hm, let me check your account. i’ll dm

Did anyone get a find a solution to this error?