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
Traceback (most recent call last):
File "/my-project/development.py", line 25, in <module>
r = Hubspot.upload_file(file_name="test.txt", content=f.read())
File "/my-project/faabric_lib/hs.py", line 1577, in upload_file
response = FilesApi().upload(
File "/my-python/lib/python3.10/site-packages/hubspot/files/files/api/files_api.py", line 1418, in upload
return self.upload_with_http_info(**kwargs) # noqa: E501
File "/my-python/lib/python3.10/site-packages/hubspot/files/files/api/files_api.py", line 1516, in upload_with_http_info
return self.api_client.call_api(
File "/my-python/lib/python3.10/site-packages/hubspot/files/files/api_client.py", line 378, in call_api
return self.__call_api(
File "/my-python/lib/python3.10/site-packages/hubspot/files/files/api_client.py", line 167, in __call_api
post_params.extend(self.files_parameters(files))
File "/my-python/lib/python3.10/site-packages/hubspot/files/files/api_client.py", line 481, in files_parameters
with open(n, "rb") as f:
OSError: [Errno 63] File name too long: b'{\n "version": "2.0",\n ..... }\n}'
I am using hubspot-api-client==8.1.0.
The text was updated successfully, but these errors were encountered:
Still the same problem in hubspot-api-client==9.0.0
The documentation for the upload method says:
:param file: File to be uploaded.
:type file: file
But in fact, it expects a file path as string instead of a file object. Passing a local file path, successfully uploads the file to the Hubspot File Manager.
Please provide a working example for the file upload using
hubspot.files.files.api.files_api.FilesApi
.Using it like that
results
I am using
hubspot-api-client==8.1.0
.The text was updated successfully, but these errors were encountered: