【问题标题】:hubspot3 client and "too many retries" errorhubspot3 客户端和“重试次数过多”错误
【发布时间】:2019-04-09 04:48:34
【问题描述】:

我正在尝试使用收件人的电子邮件从 hubspot 中提取联系人的详细信息。我正在使用 python3 客户端 "hubspot3" (https://github.com/jpetrucciani/hubspot3)。

这是我要提交的代码:

import requests
from hubspot3.contacts import ContactsClient

API_KEY=[myapikey]

client=ContactsClient(api_key=API_KEY,debug=True)

email='mytest@gmail.com'

client.get_contact_by_email(email)

回应:

WARNING:root:Too many retries for /contacts/v1/contact/email/nwnippy27+cb1@gmail.com/profile?hapikey=[myapikey]
Traceback (most recent call last):
  File "hubspot_api_test.py", line 11, in <module>
    client.get_contact_by_email(email)
  File "/opt/virtual_env/hubspot-test/lib/python3.7/site-packages/hubspot3/contacts.py", line 38, in get_contact_by_email
    "contact/email/{email}/profile".format(email=email), method="GET", **options
  File "/opt/virtual_env/hubspot-test/lib/python3.7/site-packages/hubspot3/base.py", line 339, in _call
    **options
  File "/opt/virtual_env/hubspot-test/lib/python3.7/site-packages/hubspot3/base.py", line 245, in _call_raw
    result = self._execute_request_raw(connection, request_info)
  File "/opt/virtual_env/hubspot-test/lib/python3.7/site-packages/hubspot3/base.py", line 162, in _execute_request_raw
    raise HubspotNotFound(result, request)
hubspot3.error.HubspotNotFound:
Hubspot Error

我正在阅读此错误消息,说找不到电子邮件地址。那是对的吗?如果没有,我感谢任何有关原因和解决方案的情报。

【问题讨论】:

    标签: python hubspot


    【解决方案1】:

    好的...所以不是很有用,但事实证明这只是您在电子邮件不存在时收到的错误消息。几次尝试后它放弃了,这就是您收到“重试次数过多”错误的原因。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-19
      • 1970-01-01
      • 2020-04-09
      • 1970-01-01
      • 2015-12-18
      • 2016-05-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多