Skip to content

Unable to upload documents to Alfresco CMIS #2

Description

@vijayr1912

Hi I am trying to load documents into Alfreso CMIS and I am getting this following error-

Python 3

from cmislib.model import CmisClient

FILE = '/home/monu/Fair-Work-Information-Statement.pdf'
file = open(FILE, 'rb')
fileName = file.name.split('/')[-1]
doc = None
FILE_TYPE = 'application/pdf'

try:
    doc = archive_folder_2.createDocument(str(fileName), contentFile=file, contentType=str(FILE_TYPE))
    print(f'Create Document { doc.id}')
except Exception as e:
    print(e)
    
file.close()

ERROR - 'bytes' object has no attribute 'encode'

Python 2.7

ERROR - Unable to parse non-GMT values at this stage

Not able to understand what is exactly wrong, as even .txt files are not getting uploaded. Can you help me to understand this error. Any hint would be highly appreciated. I am working on Mac OS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions