I am trying to call watson discovery service in 'ibm cloud function' where only older version python package('watson_developer_cloud') was installed. I am getting the below error when list_environments() method of discovery is called:
import json
from watson_developer_cloud import DiscoveryV1
discovery = DiscoveryV1(
version= version,
iam_apikey = apikey,
iam_url = url
)
discovery.list_environments()
error:
---------------------------------------------------------------------------
WatsonApiException Traceback (most recent call last)
<ipython-input-28-46be562e6568> in <module>()
13 )
14
---> 15 discovery.list_environments()
4 frames
/usr/local/lib/python3.6/dist-packages/watson_developer_cloud/iam_token_manager.py in request(self, method, url, headers, params, data, **kwargs)
32 from .watson_service import WatsonApiException, get_error_message
33 error_message = get_error_message(response)
---> 34 raise WatsonApiException(response.status_code, message=error_message, httpResponse=response)
35
36 def get_token(self):
WatsonApiException: Error: Not Found, Code: 404
Is there anyway for installing latest version packages in 'ibm cloud function'? or any workaround for handling the above error?