Closed moorereason closed 3 years ago
While attempting to upload a package greater than 2GB to jamf with JSSImporter (via a dataJAR recipe), the following error is returned:
JSSImporter
JSSImporter: Error: string longer than 2147483647 bytes
The fix (detailed in https://github.com/psf/requests/issues/2717#issuecomment-130343655) is to pass the file handle to requests and let requests handle the read operations.
I'm not very familiar with python-jss (buyer beware!), but changing the following two lines:
python-jss
https://github.com/jssimporter/python-jss/blob/v2.1.0/jss/distribution_point.py#L661
https://github.com/jssimporter/python-jss/blob/v2.1.0/jss/distribution_point.py#L683
to:
data=resource,
resolved the issue for me.
So you are just changing data=resource.read(), to data=resource, ?
data=resource.read(),
Correct. I submitted a PR instead of my rather clumsy bug report.
While attempting to upload a package greater than 2GB to jamf with
JSSImporter
(via a dataJAR recipe), the following error is returned:The fix (detailed in https://github.com/psf/requests/issues/2717#issuecomment-130343655) is to pass the file handle to requests and let requests handle the read operations.
I'm not very familiar with
python-jss
(buyer beware!), but changing the following two lines:https://github.com/jssimporter/python-jss/blob/v2.1.0/jss/distribution_point.py#L661
https://github.com/jssimporter/python-jss/blob/v2.1.0/jss/distribution_point.py#L683
to:
resolved the issue for me.