Discover all of the brand-new features and improvements to existing capabilities in the Dataiku 11.3 updateLET'S GO

Uploading an attachment to a Wiki Article using the Python API

Solved!
Jus
Level 1
Uploading an attachment to a Wiki Article using the Python API

Hi,

I want to attach a .pptx file to a Wiki article using the Python API. To do this, I added the file to a managed folder and then tried the following (example found in the Documentation, Wikis — Dataiku DSS 11 documentation😞

 

article = wiki.get_article('article_name')

with
open(file) as f:
    article.upload_attachment(f, "ppt.pptx")

 However, it seems like I am getting an AttributeError:

AttributeError: 'DSSWikiArticle' object has no attribute 'upload_attachment'

 I am aware I can simply add the attachment to a wiki page, but I really would like to use the Python API here. What am I doing wrong?

0 Kudos
1 Solution
Jus
Level 1
Author

We found the error: there seems to be a typo in the name of the method. The method that does exist is called: 'upload_attachement'.

View solution in original post

0 Kudos
2 Replies
Jus
Level 1
Author

We found the error: there seems to be a typo in the name of the method. The method that does exist is called: 'upload_attachement'.

0 Kudos

@Jus 

Welcome to the Dataiku Community.  So glad you are here.

It looks like you have gone deep on this issue.  Have you opened a support ticket on this topic.  It would be good to get this reviewed by the support team and on a backlog with the Dataiku Development team so this can be fixed for all.  

I’m not sure that posting here in the community will have the same effect… 

--Tom
0 Kudos