rapidata 1.4.0__py3-none-any.whl → 1.4.1__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 rapidata might be problematic. Click here for more details.

@@ -11,6 +11,9 @@ from rapidata.rapidata_client.dataset.rapidata_dataset import RapidataDataset
11
11
  from rapidata.rapidata_client.simple_builders.simple_classification_builders import ClassificationQuestionBuilder
12
12
  from rapidata.rapidata_client.simple_builders.simple_compare_builders import CompareCriteriaBuilder
13
13
 
14
+ from rapidata.api_client.exceptions import BadRequestException
15
+ from urllib3._collections import HTTPHeaderDict
16
+
14
17
  from rapidata.api_client.models.query_orders_model import QueryOrdersModel
15
18
  from rapidata.api_client.models.page_info import PageInfo
16
19
  from rapidata.api_client.models.root_filter import RootFilter
@@ -117,8 +120,12 @@ class RapidataClient:
117
120
  order_page_result = self.openapi_service.order_api.order_query_get(QueryOrdersModel(
118
121
  page=PageInfo(index=1, size=amount),
119
122
  filter=RootFilter(filters=[Filter(field="OrderName", operator="Contains", value=name)])))
120
- except Exception:
121
- raise ValueError(f"Failed to find orders with name {name}.")
123
+
124
+ except BadRequestException as e:
125
+ raise ValueError(f"Error occured during request. \nError: {e.body} \nTraceid: {e.headers.get('X-Trace-Id') if isinstance(e.headers, HTTPHeaderDict) else 'Unknown'}")
126
+
127
+ except Exception as e:
128
+ raise ValueError(f"Unknown error occured: {e}")
122
129
 
123
130
  orders = [self.get_order(order.id) for order in order_page_result.items]
124
131
  return orders
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rapidata
3
- Version: 1.4.0
3
+ Version: 1.4.1
4
4
  Summary: Rapidata package containing the Rapidata Python Client to interact with the Rapidata Web API in an easy way.
5
5
  License: Apache-2.0
6
6
  Author: Rapidata AG
@@ -343,7 +343,7 @@ rapidata/rapidata_client/metadata/transcription_metadata.py,sha256=THtDEVCON4Ulc
343
343
  rapidata/rapidata_client/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
344
344
  rapidata/rapidata_client/order/rapidata_order.py,sha256=u0VhNgnbT0dn3AJiITqjtqn_OWgdwUcXrgU4iblPXZI,4663
345
345
  rapidata/rapidata_client/order/rapidata_order_builder.py,sha256=QvICzduLAuAkf8qFKxHV3zAag838WnV9lEzWdD4dxI0,15926
346
- rapidata/rapidata_client/rapidata_client.py,sha256=wZ-TANlm3ZNzTiYj6LXgYp5C9a0wkF0cAQcxRPp_TVg,6426
346
+ rapidata/rapidata_client/rapidata_client.py,sha256=FnuicEG5iCsrOiY5YpPtDKI4P0RBuktCaHtnIB03UYc,6763
347
347
  rapidata/rapidata_client/referee/__init__.py,sha256=Ow9MQsONhF4sX2wFK9jbvSBrpcJgtq3OglIQMkBUdIY,167
348
348
  rapidata/rapidata_client/referee/base_referee.py,sha256=bMy7cw0a-pGNbFu6u_1_Jplu0A483Ubj4oDQzh8vu8k,493
349
349
  rapidata/rapidata_client/referee/classify_early_stopping_referee.py,sha256=B5wsqKM3_Oc1TU_MFGiIyiXjwK1LcmaVjhzLdaL8Cgw,1797
@@ -372,7 +372,7 @@ rapidata/service/local_file_service.py,sha256=pgorvlWcx52Uh3cEG6VrdMK_t__7dacQ_5
372
372
  rapidata/service/openapi_service.py,sha256=pGcOCttKZW0PVCSM7Kfehe5loh7CxmmDDbu4UJbamnI,2770
373
373
  rapidata/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
374
374
  rapidata/utils/image_utils.py,sha256=TldO3eJWG8IhfJjm5MfNGO0mEDm1mQTsRoA0HLU1Uxs,404
375
- rapidata-1.4.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
376
- rapidata-1.4.0.dist-info/METADATA,sha256=xP5dp4-r5EBQ1ZVDnEn1vFaMLY6_OO6TeXp0Fx0JxCo,1012
377
- rapidata-1.4.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
378
- rapidata-1.4.0.dist-info/RECORD,,
375
+ rapidata-1.4.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
376
+ rapidata-1.4.1.dist-info/METADATA,sha256=Ppz47q5U5zWw1YjD6jcZ5DzyUg1uuAhe0-K_9ScQnf0,1012
377
+ rapidata-1.4.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
378
+ rapidata-1.4.1.dist-info/RECORD,,