You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I created a json file based on this format and I used it to create a test user in my sanbox. But when I try to load that valid user in pattern it's not working and it just get stuck. Here is my json file. sample-user.json
Also when I try to fetch transactions (below code) for that user in sandbox, it seems it get stuck in the while loop. I'd appreciate any feedback on this. Thanks!
`def get_transactions(access_token: str):
# Set cursor to empty to receive all historical updates
cursor = ''
# New transaction updates since "cursor"
added = []
modified = []
removed = [] # Removed transaction ids
has_more = True
try:
# Iterate through each page of new transaction updates for item
while has_more:
request = TransactionsSyncRequest(
access_token=access_token,
cursor=cursor,
)
response = client.transactions_sync(request).to_dict()
cursor = response['next_cursor']
print(f"cursor: {cursor}") # cursor is always empty for our custom data!!!
if cursor == '':
time.sleep(2)
continue
# If cursor is not an empty string, we got results,
# so add this page of results
added.extend(response['added'])
modified.extend(response['modified'])
removed.extend(response['removed'])
has_more = response['has_more']
# Return all transactions
all_transactions = sorted(added, key=lambda t: t['date'])
return all_transactions
except plaid.ApiException as e:
error_response = json.loads(e.body)
return error_response`
The text was updated successfully, but these errors were encountered:
I haven't tried to reproduce this, but one thing that jumps out at me is that your user's transactions are all in 2023. Because the Pattern app does not use the transactions.days_requested field, it requests the default 90 days of transaction history rather than the maximum 730 days available. As a result, it won't see any transaction history for this user.
Hi, I created a json file based on this format and I used it to create a test user in my sanbox. But when I try to load that valid user in pattern it's not working and it just get stuck. Here is my json file. sample-user.json
Also when I try to fetch transactions (below code) for that user in sandbox, it seems it get stuck in the while loop. I'd appreciate any feedback on this. Thanks!
`def get_transactions(access_token: str):
# Set cursor to empty to receive all historical updates
cursor = ''
The text was updated successfully, but these errors were encountered: