Skip to content

ReadTimeout error #150

Description

@zenstores-demo

Hi there, I had this set up to pull all tags from our Intercom and then make a CSV with them, this was before the change to the personal access tokens and just using the API keys. I have since updated everything to use the PAT, but I am now getting the below error.

ReadTimeout: HTTPSConnectionPool(host='api.intercom.io', port=443): Read timed out. (read timeout=10)

Could this be because we have so many tags? I am working in a Jupyter notebook and the used code is below:

from intercom.client import Client

import unicodecsv
import time

intercom = Client(personal_access_token='xxx')

def get_tag_count():
  tags_count = intercom.counts.for_type(type='user', count='tag').attributes
  timestr = time.strftime('%Y%m%d')
  csv_filename = 'tags-report-{}.csv'.format(timestr)
  outputFile = open(csv_filename, 'w')
  outputWriter = unicodecsv.writer(outputFile)
  for obj in tags_count:
    row = obj.items()[0]
    
    outputWriter.writerow(row)
    print row

  outputFile.close()
#   print tags_count

# Kick things off
get_tag_count()

Any advice that can be offered by you is very much appreciated.

All the best, Harry

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions