cognite-extractor-utils 7.5.9__py3-none-any.whl → 7.5.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cognite-extractor-utils might be problematic. Click here for more details.

@@ -16,7 +16,7 @@
16
16
  Cognite extractor utils is a Python package that simplifies the development of new extractors.
17
17
  """
18
18
 
19
- __version__ = "7.5.9"
19
+ __version__ = "7.5.10"
20
20
  from .base import Extractor
21
21
 
22
22
  __all__ = ["Extractor"]
@@ -25,6 +25,7 @@ from typing import (
25
25
  )
26
26
  from urllib.parse import ParseResult, urlparse
27
27
 
28
+ from h11._util import LocalProtocolError
28
29
  from httpx import URL, Client, Headers, Request, StreamConsumed, SyncByteStream
29
30
  from requests.utils import super_len
30
31
 
@@ -481,6 +482,19 @@ class IOFileUploadQueue(AbstractUploadQueue):
481
482
  try:
482
483
  upload_file(read_file, file_meta)
483
484
 
485
+ except LocalProtocolError as e:
486
+ error_message = str(e)
487
+ if (
488
+ "Too much data for declared Content" in error_message
489
+ or "Too little data for declared Content-Length" in error_message
490
+ ):
491
+ self.logger.error(
492
+ f"Content Length Mismatch while uploading file: {file_meta} error message: {error_message}"
493
+ )
494
+
495
+ self.add_entry_failure_logger(file_name=str(file_meta.name), error=e)
496
+ self.errors.append(e)
497
+
484
498
  except Exception as e:
485
499
  self.logger.exception(
486
500
  f"Unexpected error while uploading file: {file_meta.external_id} {file_meta.name}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cognite-extractor-utils
3
- Version: 7.5.9
3
+ Version: 7.5.10
4
4
  Summary: Utilities for easier development of extractors for CDF
5
5
  Project-URL: repository, https://github.com/cognitedata/python-extractor-utils
6
6
  Author-email: Mathias Lohne <mathias.lohne@cognite.com>
@@ -14,7 +14,7 @@ Requires-Dist: azure-identity>=1.14.0
14
14
  Requires-Dist: azure-keyvault-secrets>=4.7.0
15
15
  Requires-Dist: cognite-sdk>=7.59.0
16
16
  Requires-Dist: croniter>=6.0.0
17
- Requires-Dist: dacite>=1.6.0
17
+ Requires-Dist: dacite<1.9.0,>=1.6.0
18
18
  Requires-Dist: decorator>=5.1.1
19
19
  Requires-Dist: httpx<1,>=0.27.0
20
20
  Requires-Dist: jsonlines>=4.0.0
@@ -1,4 +1,4 @@
1
- cognite/extractorutils/__init__.py,sha256=9ImaA1fzZeO4aXeQjkMOpz_E7Nky0b4IP9htbfQLNjI,764
1
+ cognite/extractorutils/__init__.py,sha256=PPeqjI1OnpB1kdKnuKjHukkj9BauAO6kJHugrm8GbH4,765
2
2
  cognite/extractorutils/_inner_util.py,sha256=ZMZIBwFpSD39RzLZq_OJlrFtVt8NFOtU4ObzAG8vTB4,1779
3
3
  cognite/extractorutils/base.py,sha256=-jkGgUMYKdhFReua8ZoGUQwT1qbOvg6nTrt0lyJOGVc,16354
4
4
  cognite/extractorutils/exceptions.py,sha256=4qreRiTwZH9lyLIKR67TP02MUxN9oYhCd2vFTb5bRME,1125
@@ -40,11 +40,11 @@ cognite/extractorutils/uploader/_metrics.py,sha256=J2LJXb19L_SLSJ_voNIQHYLp0pjxU
40
40
  cognite/extractorutils/uploader/assets.py,sha256=a6LKbGjWh29Lj0PnL1bdhP88e27FKh8xfTFTsOBUOew,5713
41
41
  cognite/extractorutils/uploader/data_modeling.py,sha256=h4uRnppU2dVBquJz0Uy2SKNy5A1Gq-g7ZAlERu5vjIU,3614
42
42
  cognite/extractorutils/uploader/events.py,sha256=soU8TslPFIA7Ck4ATR_a7MHGitztRcn0cEt7LIbMPsE,5643
43
- cognite/extractorutils/uploader/files.py,sha256=U3wBU8iJNbOIP-JV_K3tRVHkB1gsb4lCjNlWbr-wg-0,26553
43
+ cognite/extractorutils/uploader/files.py,sha256=ag3TUrImJdAUiOSXugagD03-9WGlFpIyd31z3WMJU20,27180
44
44
  cognite/extractorutils/uploader/raw.py,sha256=8duMk9uVJPK3O6C0nzwnvrl0UzBtJs_T_L1la0Vo89k,6713
45
45
  cognite/extractorutils/uploader/time_series.py,sha256=rs-jEChEZymxc98TYePpSRstPjQnDJd97vjOEYc-0-A,26568
46
46
  cognite/extractorutils/uploader/upload_failure_handler.py,sha256=wbUSXUP26rbmK2NGdQMzcWQwNOh2sXYOnlj0A_sk1n8,2003
47
- cognite_extractor_utils-7.5.9.dist-info/METADATA,sha256=jInc1LEbqmrE65cSI1kdktojnU0Y8AU5muy98PjmT7I,5272
48
- cognite_extractor_utils-7.5.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
49
- cognite_extractor_utils-7.5.9.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
50
- cognite_extractor_utils-7.5.9.dist-info/RECORD,,
47
+ cognite_extractor_utils-7.5.10.dist-info/METADATA,sha256=cSWsbtpDLUv9uUtC_9lLcuBwv1oBW_3XiDVIXXOSFyo,5280
48
+ cognite_extractor_utils-7.5.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
49
+ cognite_extractor_utils-7.5.10.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
50
+ cognite_extractor_utils-7.5.10.dist-info/RECORD,,