A cryptic docassemble error when syncing to OneDrive has a simple explanation.

I’m using docassemble to automate my legal documents. I keep my templates in Microsoft OneDrive and sync them to docassemble.

Yesterday, I ran into a cryptic error when syncing with OneDrive. I found the answer when I searched docassemble’s Slack group.

On May 30, 2021, Mark Schulze (another docassemble user) posted a picture of the error that I was also having:


Schulze explained that the "code":"accessDenied" error was caused by having a DOCX file open on his Mac. The solution is simple: Close the file, and then sync.

Jonathan Pyle (the genius behind docassemble), wrote:

I hadn’t seen that before. It looks like this is caused by the use of S3. When S3 is used combination with OneDrive, the modification times of files on S3 and OneDrive need to be kept in sync. S3 doesn’t let you edit the modification times of files, so when docassemble writes a file to S3, it needs to update the modification time of the file on OneDrive to match that of the file on S3. Apparently when a OneDrive file is open for editing, its metadata cannot be updated using the API. That’s very unfortunate.

I’m using S3 for persistent storage for docassemble and OneDrive. I had the DOCX file open on my Mac. I was trying to sync from iPad. Everything is now syncing well after I closed the DOCX file on my Mac.