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
I'm trying to push documents to Hubspot through the FilesAPI. Here is my code :
Load the libraries: import hubspot from hubspot.files.files.api.files_api import FilesApi
Load the file : with open("data/<mypath>.pdf", "rb") as f: file = f.read()
Get my client api_client = hubspot.Client.create(access_token=<mytoken>)
Get the fileAPi api = FilesApi( api_client=api_client, )
Post a document : response = api.upload( file=file, folder_path="/")
This code gives me the following error : File "./python3.11/site-packages/hubspot/files/files/api/files_api.py", line 1253, in upload_with_http_info header_params["Accept"] = self.api_client.select_header_accept(["application/json", "*/*"]) # noqa: E501 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Client' object has no attribute 'select_header_accept'
Has anyone ever had this error?
I tried those versions of hubspot-api-python, got the same error :
8.1.1
7.5.0
Thanks a lot ;)
The text was updated successfully, but these errors were encountered:
Hi everyone :)
I'm trying to push documents to Hubspot through the FilesAPI. Here is my code :
Load the libraries:
import hubspot from hubspot.files.files.api.files_api import FilesApi
Load the file :
with open("data/<mypath>.pdf", "rb") as f: file = f.read()
Get my client
api_client = hubspot.Client.create(access_token=<mytoken>)
Get the fileAPi
api = FilesApi( api_client=api_client, )
Post a document :
response = api.upload( file=file, folder_path="/")
This code gives me the following error :
File "./python3.11/site-packages/hubspot/files/files/api/files_api.py", line 1253, in upload_with_http_info header_params["Accept"] = self.api_client.select_header_accept(["application/json", "*/*"]) # noqa: E501 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Client' object has no attribute 'select_header_accept'
Has anyone ever had this error?
I tried those versions of hubspot-api-python, got the same error :
Thanks a lot ;)
The text was updated successfully, but these errors were encountered: