Skip to content
New issue

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

retrieve_latest on missing time series does not raise CogniteNotFoundError #578

Open
oholsen opened this issue Oct 16, 2019 · 1 comment
Assignees
Labels
1.x Issues related to 1.x SDK bug

Comments

@oholsen
Copy link
Contributor

oholsen commented Oct 16, 2019

Describe the bug
Raises CogniteAPIError, not the more specific CogniteNotFoundError (which is raised e.g. on deleting missing time series).

Expected behavior
Raise CogniteNotFoundError.

Screenshots

     raise CogniteAPIError(msg, code, x_request_id, missing=missing, duplicated=duplicated, extra=extra)
E       cognite.client.exceptions.CogniteAPIError: Time series ids not found | code: 400 | X-Request-ID: 2e4ebd42-4d15-9
d63-a31d-c9257d727760
E       Missing: [{'externalId': 'itest:deletepoint'


c:\python\python37-32\lib\site-packages\cognite\client\_api\datapoints.py:160: in retrieve_latest
    raise tasks_summary.exceptions[0]
c:\python\python37-32\lib\site-packages\cognite\client\utils\_concurrency.py:127: in execute_tasks_concurrently
    res = f.result()
c:\python\python37-32\lib\concurrent\futures\_base.py:435: in result
    return self.__get_result()
c:\python\python37-32\lib\concurrent\futures\_base.py:384: in __get_result
    raise self._exception
c:\python\python37-32\lib\concurrent\futures\thread.py:57: in run
    result = self.fn(*self.args, **self.kwargs)
c:\python\python37-32\lib\site-packages\cognite\client\_api_client.py:110: in _post
    "POST", url_path, json=json, headers=headers, params=params, timeout=self._config.timeout
c:\python\python37-32\lib\site-packages\cognite\client\_api_client.py:138: in _do_request
    self._raise_API_error(res, payload=json_payload)

System information:

  • OS: Windows 10
  • Python Version: 3.7
  • SDK Version: cognite-sdk-core 1.3.1
@oholsen oholsen added bug 1.x Issues related to 1.x SDK labels Oct 16, 2019
@MortGron
Copy link
Contributor

Still true for sdk version 2.31.0, and also applies to retrieve and retrieve_dataframe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Issues related to 1.x SDK bug
Projects
None yet
Development

No branches or pull requests

3 participants