I have an app that is connected to my dropbox account with a webhook and sends an alert each time something is changed in certain folders. For some reason, I am getting the following error when I make changes to files in the account
dropbox.exceptions.ApiError: ApiError('8fe4838db3874737b55c0d7e3935585e', ListFolderError('path', LookupError('unsupported_content_type', None)))
The following is the code running in which this error is happening:
def process_user(account, access_token, refresh_token):
# cursor for the user (None the first time)
cursor = redis_client.hget('cursors', account)
dbx = Dropbox(
oauth2_access_token=access_token,
oauth2_refresh_token=refresh_token,
app_key=APP_KEY,
app_secret=APP_SECRET
)
print('PROCESS USER IS RUNNING')
has_more = True
while has_more:
if cursor is None:
result = dbx.files_list_folder(path='', recursive=True, include_non_downloadable_files=True)
else:
result = dbx.files_list_folder_continue(cursor)
for entry in result.entries:
if filter_notifications(entry):
if isinstance(entry, FileMetadata):
send_notification('File Metadat')
elif isinstance(entry, DeletedMetadata):
send_notification('DeletedMetadata')
elif isinstance(entry, FolderMetadata):
send_notification('Folder Metadata')
else:
send_notification('Something happened, not sure what...')
# Update cursor
cursor = result.cursor
redis_client.hset('cursors', account, cursor)
# Repeat only if there's more to do
has_more = result.has_more
Please advise what could be wrong. Thank you for your help