datadotworld / data.world-py

Python package for data.world
https://data.world/integrations/python
Apache License 2.0
102 stars 28 forks source link

load_dataset() problem #91

Closed LW130003 closed 6 years ago

LW130003 commented 6 years ago

lds = dw.load_dataset('data-society/the-simpsons-by-the-data')

gives me:ValueError Traceback (most recent call last)

in () 1 # load dataset ----> 2 lds = dw.load_dataset('data-society/the-simpsons-by-the-data') C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\__init__.py in load_dataset(dataset_key, force_update, auto_update, profile, **kwargs) 99 load_dataset(dataset_key, 100 force_update=force_update, --> 101 auto_update=auto_update) 102 103 C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\datadotworld.py in load_dataset(self, dataset_key, force_update, auto_update) 160 else: 161 try: --> 162 dataset_info = self.api_client.get_dataset(dataset_key) 163 except RestApiError as e: 164 return LocalDataset(descriptor_file) C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\api.py in get_dataset(self, dataset_key) 96 try: 97 return self._datasets_api.get_dataset( ---> 98 *(parse_dataset_key(dataset_key))).to_dict() 99 except _swagger.rest.ApiException as e: 100 raise RestApiError(cause=e) C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\apis\datasets_api.py in get_dataset(self, owner, id, **kwargs) 644 return self.get_dataset_with_http_info(owner, id, **kwargs) 645 else: --> 646 (data) = self.get_dataset_with_http_info(owner, id, **kwargs) 647 return data 648 C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\apis\datasets_api.py in get_dataset_with_http_info(self, owner, id, **kwargs) 727 _preload_content=params.get('_preload_content', True), 728 _request_timeout=params.get('_request_timeout'), --> 729 collection_formats=collection_formats) 730 731 def patch_dataset(self, owner, id, body, **kwargs): C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\api_client.py in call_api(self, resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, callback, _return_http_data_only, collection_formats, _preload_content, _request_timeout) 324 body, post_params, files, 325 response_type, auth_settings, callback, --> 326 _return_http_data_only, collection_formats, _preload_content, _request_timeout) 327 else: 328 thread = threading.Thread(target=self.__call_api, C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\api_client.py in __call_api(self, resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, callback, _return_http_data_only, collection_formats, _preload_content, _request_timeout) 159 # deserialize response data 160 if response_type: --> 161 return_data = self.deserialize(response_data, response_type) 162 else: 163 return_data = None C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\api_client.py in deserialize(self, response, response_type) 237 data = response.data 238 --> 239 return self.__deserialize(data, response_type) 240 241 def __deserialize(self, data, klass): C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\api_client.py in __deserialize(self, data, klass) 277 return self.__deserialize_datatime(data) 278 else: --> 279 return self.__deserialize_model(data, klass) 280 281 def call_api(self, resource_path, method, C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\api_client.py in __deserialize_model(self, data, klass) 627 and isinstance(data, (list, dict)): 628 value = data[klass.attribute_map[attr]] --> 629 kwargs[attr] = self.__deserialize(value, attr_type) 630 631 instance = klass(**kwargs) C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\api_client.py in __deserialize(self, data, klass) 255 sub_kls = re.match('list\[(.*)\]', klass).group(1) 256 return [self.__deserialize(sub_data, sub_kls) --> 257 for sub_data in data] 258 259 if klass.startswith('dict('): C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\api_client.py in (.0) 255 sub_kls = re.match('list\[(.*)\]', klass).group(1) 256 return [self.__deserialize(sub_data, sub_kls) --> 257 for sub_data in data] 258 259 if klass.startswith('dict('): C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\api_client.py in __deserialize(self, data, klass) 277 return self.__deserialize_datatime(data) 278 else: --> 279 return self.__deserialize_model(data, klass) 280 281 def call_api(self, resource_path, method, C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\api_client.py in __deserialize_model(self, data, klass) 629 kwargs[attr] = self.__deserialize(value, attr_type) 630 --> 631 instance = klass(**kwargs) 632 633 return instance C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\models\file_summary_response.py in __init__(self, name, source, description, labels, size_in_bytes, created, updated) 68 self.source = source 69 if description is not None: ---> 70 self.description = description 71 if labels is not None: 72 self.labels = labels C:\Users\LW130003\Anaconda3\lib\site-packages\datadotworld\client\_swagger\models\file_summary_response.py in description(self, description) 151 raise ValueError("Invalid value for `description`, length must be less than or equal to `240`") 152 if description is not None and len(description) < 1: --> 153 raise ValueError("Invalid value for `description`, length must be greater than or equal to `1`") 154 155 self._description = description ValueError: Invalid value for `description`, length must be greater than or equal to `1`
rflprr commented 6 years ago

Fixed by https://github.com/datadotworld/data.world-py/pull/90