Ошибка при загрузке документов с помошью curl.exe
На Linux ошибки нет
curl --location --request PUT 'https://procedure.prozorro.sale/api/documents/public?documentType=contractSigned' \
--header 'Authorization: 69d1b914-76af-4616-9776-999999' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@"/home/kuzmenko-pavel/Рабочий стол/договір оренди.PDF"'
На windows ошибка
curl.exe --location --request PUT 'https://procedure.prozorro.sale/api/documents/public?documentType=contractSigned'
--header 'Authorization: 69d1b914-76af-4616-9776-999999'
--header 'Content-Type: multipart/form-data'
--form 'file=@"D:\doclan\fgv\documents\2022\договр оренди.PDF"'
[2022-05-04T13:27:12.390Z] | prozorro_sale.tools.errors | ERROR - Unknown error caught in API - S3Storage.upload: 'Header' object has no attribute 'split' | X-Request-ID: a5bcd16af3e326ee3b5e7e927268580f
Traceback (most recent call last):
File "/document_service/prozorro_sale/document_service/errors.py", line 128, in wrapper
return await func(*args, **kwargs)
File "/document_service/prozorro_sale/document_service/storages/s3_storage.py", line 73, in upload
await client.put_object(
File "/usr/local/lib/python3.9/site-packages/aiobotocore/client.py", line 173, in _make_api_call
http, parsed_response = await self._make_request(
File "/usr/local/lib/python3.9/site-packages/aiobotocore/client.py", line 193, in _make_request
return await self._endpoint.make_request(operation_model, request_dict)
File "/usr/local/lib/python3.9/site-packages/aiobotocore/endpoint.py", line 77, in _send_request
request = await self.create_request(request_dict, operation_model)
File "/usr/local/lib/python3.9/site-packages/aiobotocore/endpoint.py", line 70, in create_request
await self._event_emitter.emit(event_name, request=request,
File "/usr/local/lib/python3.9/site-packages/aiobotocore/hooks.py", line 27, in _emit
response = await handler(**kwargs)
File "/usr/local/lib/python3.9/site-packages/aiobotocore/signers.py", line 16, in handler
return await self.sign(operation_name, request)
File "/usr/local/lib/python3.9/site-packages/aiobotocore/signers.py", line 63, in sign
auth.add_auth(request)
File "/usr/local/lib/python3.9/site-packages/botocore/auth.py", line 384, in add_auth
canonical_request = self.canonical_request(request)
File "/usr/local/lib/python3.9/site-packages/botocore/auth.py", line 326, in canonical_request
cr.append(self.canonical_headers(headers_to_sign) + '\n')
File "/usr/local/lib/python3.9/site-packages/botocore/auth.py", line 268, in canonical_headers
value = ','.join(self._header_value(v) for v in
File "/usr/local/lib/python3.9/site-packages/botocore/auth.py", line 268, in <genexpr>
value = ','.join(self._header_value(v) for v in
File "/usr/local/lib/python3.9/site-packages/botocore/auth.py", line 279, in _header_value
return ' '.join(value.split())
AttributeError: 'Header' object has no attribute 'split'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/errors.py", line 48, in handler
return await func(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/errors.py", line 108, in _catch_error_middleware
return await handler(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/auth/__init__.py", line 123, in context_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/auth/__init__.py", line 143, in handler
return await func(request, *args, **kwargs)
File "/document_service/prozorro_sale/document_service/api/api.py", line 38, in upload_document
document_data = await request.app.storage.upload(scope, doc_type, request)
File "/document_service/prozorro_sale/document_service/errors.py", line 152, in wrapper
raise error.__class__(f'{func.__qualname__}: {error}')
AttributeError: S3Storage.upload: 'Header' object has no attribute 'split'