Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intercom.errors.ResourceNotFound: scroll parameter not found #201

Open
oscar-lukersmith opened this issue Oct 9, 2018 · 0 comments
Open

Comments

@oscar-lukersmith
Copy link

oscar-lukersmith commented Oct 9, 2018


a = 0
insert = ''

for user in intercom.users.scroll():
  amp_id = non_type(user.id)
  user_id = non_type(user.user_id)

  if len(insert) == 0:
    insert = "('" + amp_id + "','" + user_id + "')"
  else:
    insert = insert + ",('" + amp_id + "','" + user_id + "')"
  a += 1 

  if a % 10000 == 0:
    lets_insert = insert_query.format(insert)
    cursor.execute(lets_insert)
    con.commit()
    insert = ''
   

It seems to reach different lengths in the scroll (130k records and then 240k records) and then errors out saying intercom.errors.ResourceNotFound: scroll parameter not found. I understand i probably need to pass the scroll parameter from the previous scroll but I cant figure out how to do it. Any help would be greatly appreciated - also apologies if I have missed anything in the docs I can't find anything about scroll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant