Error 500 trying to install plugin from Archive with API

wbezou Registered Posts: 8 ✭✭✭


I'm in the process of automating a complete installation of DataIku. While I'm almost done, I'm struggling with plugins install. I'm unable to use the ansible collection or the python API as I keep getting an error 500 from the server when trying to install a plugin from a zip archive (installing the same plugin through the GUI works fine).

the (very simple script, based on the API documentation):

from pprint import pprintimport dataikuapiclient = dataikuapi.DSSClient("http://localhost:10000/", "*******")future = client.install_plugin_from_archive('')result = future.wait_for_result()pprint(result)

the error:

Traceback (most recent call last):File "/usr/local/lib/python3.8/dist-packages/dataikuapi/", line 1452, in _perform_httphttp_res.raise_for_status()File "/usr/local/lib/python3.8/dist-packages/requests/", line 1024, in raise_for_statusraise HTTPError(http_error_msg, response=self)requests.exceptions.HTTPError: 500 Server Error: Server Error for url: http://localhost:10000//dip/publicapi/plugins/actions/installFromZipDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "", line 6, in <module>future = client.install_plugin_from_archive('')File "/usr/local/lib/python3.8/dist-packages/dataikuapi/", line 286, in install_plugin_from_archiveself._perform_json("POST", "/plugins/actions/installFromZip", files=files)File "/usr/local/lib/python3.8/dist-packages/dataikuapi/", line 1468, in _perform_jsonreturn self._perform_http(method, path, params=params, body=body, files=files, stream=False, raw_body=raw_body).json()File "/usr/local/lib/python3.8/dist-packages/dataikuapi/", line 1459, in _perform_httpraise DataikuException("%s: %s" % (ex.get("errorType", "Unknown error"), ex.get("detailedMessage", ex.get("message", "No message"))))dataikuapi.utils.DataikuException: java.lang.Exception: Could not install the plugin

From what I understand, the server is replying with error 500, as I don't have many option to try on client side, I have absolutly no idea what is wrong ...

any help would be appreciated.

tested on dataiku 12.6.3 with latest python API

Operating system used: Ubuntu 20.04


Best Answer

  • wbezou
    wbezou Registered Posts: 8 ✭✭✭
    Answer ✓

    Sure, if you go in the documentation examples section, you can find related info on the method "install_plugin_from_archive" (here : Plugins - Dataiku Developer Guide )

    In the API documentation, there is no mention of this method in the plugins section.

    Finaly, in the code of the dataiku API, there is another method the "start_install_plugin_from_archve" who works with future and can be called with "wait_for_result"

    as such, the code in the ansible collection goes from

    if args.zip_file is not None:future = client.install_plugin_from_archive(args.zip_file)


    if args.zip_file is not None:with open(args.zip_file,"rb") as f:future = client.start_install_plugin_from_archive(f)

    with an updated local collection, it works


Setup Info
      Help me…