【发布时间】: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
我正在阅读此错误消息,说找不到电子邮件地址。那是对的吗?如果没有,我感谢任何有关原因和解决方案的情报。
【问题讨论】: