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

Free Support Forum - aspose.com

[Python] Can't create PST Predefined folder - SYNC_ISSUES, JUNK_EMAIL, UNSPECIFIED

I’m using Aspose.Email-for-Python-via-NET 20.2.1. I’ve got problem creating some of predefined folders. Example:

personal_storage = PersonalStorage.create(
    out_dir + f"example.pst", FileFormatVersion.UNICODE
pst_sync_issues = personal_storage.create_predefined_folder(
    "Sync Issues",StandardIpmFolder.SYNC_ISSUES
pst_junk_email = personal_storage.create_predefined_folder(
    "Junk Email", StandardIpmFolder.JUNK_EMAIL
pst_unspecified = personal_storage.create_predefined_folder(
    "Custom", StandardIpmFolder.UNSPECIFIED

Created JUNK_EMAIL and SYNC_ISSUES are None. On attempt of creating UNSPECIFIED folder an error occurs. Output:

 <class 'NoneType'>
 <class 'NoneType'>
 Traceback (most recent call last):
   File "C:/<****>/test.py", line 23, in <module>
   File "C:/<****>/test.py", line 18, in create_personal_storage
 pst_unspecified = personal_storage.create_predefined_folder("Custom", StandardIpmFolder.UNSPECIFIED)
 RuntimeError: Proxy error: Specified argument was out of the range of valid values.
 Parameter name: defaultFolder

Is there internal bug or I’m doing something wrong?


I have observed the issue shared by you and request you to please share the working sample project reproducing the issue on your end. Its strange that you are getting issue on adding folder with name, “UNSCPECIFIED”. Can you please try using some other folder name and try adding that and see if there is any issue with this specific name or not.