We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Create new blank presentation PPTX in Python

Hi, I’m trying to create a blank pptx via python but I get this error:

AttributeError: ‘dict’ object has no attribute 'Save’

My code:

def create_empty_pres(file_name=‘empty_file_2.pptx’):
doc = Document(file_name)
response = doc.create_empty_presentation()
print response
print 'Done’


Cannot see what I’m doing wrong?

Hi Majeed,

Thanks for your interest in Aspose.Slides.

I have observed the issue details shared by you and request you to please try using the attached sample code on your end for the time being. We are also looking in to our SDK for possible issue.

It seems that the error probably comes from following line in the code which is not the part of SDK.


I think you are probably trying to save the output file and Output file is not present in response. Actually, response is a dict object which can give him the name of the file. If you want to save a dict object then I like to add here that it does not support Save method. You can comment out the above line of code to avoid this exception. You may download output empty presentation separately using storage API. Please refer to file test_get_file example from following link to download file.

I hope the shared information will be helpful.

Many Thanks,

Got it, thanks!