We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from indico_toolkit.pipelines import FileProcessing from indico_toolkit.indico_wrapper import Datasets dsets = Datasets(client, dataset_id=122) fp = FileProcessing() fp.get_file_paths_from_dir("./metlife_fin_loans/bank_notices_extra_data/",recursive_search=True) dsets.add_files_to_dataset(fp.file_paths)
Error: `IndicoRequestError Traceback (most recent call last) in ----> 1 dsets.add_files_to_dataset(fp.file_paths)
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico_toolkit/indico_wrapper/dataset.py in add_files_to_dataset(self, filepaths) 48 49 def add_files_to_dataset(self, filepaths: List[str]) -> Dataset: ---> 50 dataset = self._upload_files(filepaths) 51 return self._process_uploaded_files(dataset) 52
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico_toolkit/indico_wrapper/dataset.py in _upload_files(self, filepaths) 105 106 def _upload_files(self, filepaths): --> 107 return self.client.call(AddFiles(dataset_id=self.dataset_id, files=filepaths))
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico/client/client.py in call(self, request) 62 63 if isinstance(request, RequestChain): ---> 64 return self._handle_request_chain(request) 65 elif request and isinstance(request, HTTPRequest): 66 return self._http.execute_request(request)
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico/client/client.py in _handle_request_chain(self, chain) 37 for request in chain.requests(): 38 if isinstance(request, HTTPRequest): ---> 39 response = self._http.execute_request(request) 40 chain.previous = response 41 elif isinstance(request, RequestChain):
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico/http/client.py in execute_request(self, request) 76 return request.process_response( 77 self._make_request( ---> 78 method=request.method.value.lower(), path=request.path, **request.kwargs 79 ) 80 )
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico/queries/datasets.py in process_response(self, response) 328 329 def process_response(self, response): --> 330 return Dataset(**super().process_response(response)["addDatasetFiles"]) 331 332
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico/client/request.py in process_response(self, response) 43 error="\n".join(error["message"] for error in errors), 44 code=400, ---> 45 extras=extras, 46 ) 47 return response["data"]
IndicoRequestError: Status: 400, Error: Variable "$metadata" got invalid value "null". Expected type "JSONString", found "null". Extras: {'locations': [[{'column': 41, 'line': 2}]]}`
The text was updated successfully, but these errors were encountered:
Scott771
No branches or pull requests
Error:
`IndicoRequestError Traceback (most recent call last)
in
----> 1 dsets.add_files_to_dataset(fp.file_paths)
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico_toolkit/indico_wrapper/dataset.py in add_files_to_dataset(self, filepaths)
48
49 def add_files_to_dataset(self, filepaths: List[str]) -> Dataset:
---> 50 dataset = self._upload_files(filepaths)
51 return self._process_uploaded_files(dataset)
52
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico_toolkit/indico_wrapper/dataset.py in _upload_files(self, filepaths)
105
106 def _upload_files(self, filepaths):
--> 107 return self.client.call(AddFiles(dataset_id=self.dataset_id, files=filepaths))
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico/client/client.py in call(self, request)
62
63 if isinstance(request, RequestChain):
---> 64 return self._handle_request_chain(request)
65 elif request and isinstance(request, HTTPRequest):
66 return self._http.execute_request(request)
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico/client/client.py in _handle_request_chain(self, chain)
37 for request in chain.requests():
38 if isinstance(request, HTTPRequest):
---> 39 response = self._http.execute_request(request)
40 chain.previous = response
41 elif isinstance(request, RequestChain):
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico/http/client.py in execute_request(self, request)
76 return request.process_response(
77 self._make_request(
---> 78 method=request.method.value.lower(), path=request.path, **request.kwargs
79 )
80 )
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico/queries/datasets.py in process_response(self, response)
328
329 def process_response(self, response):
--> 330 return Dataset(**super().process_response(response)["addDatasetFiles"])
331
332
~/Desktop/jupyter_kernels/new_client/venv/lib/python3.7/site-packages/indico/client/request.py in process_response(self, response)
43 error="\n".join(error["message"] for error in errors),
44 code=400,
---> 45 extras=extras,
46 )
47 return response["data"]
IndicoRequestError: Status: 400, Error: Variable "$metadata" got invalid value "null".
Expected type "JSONString", found "null".
Extras: {'locations': [[{'column': 41, 'line': 2}]]}`
The text was updated successfully, but these errors were encountered: