Google Drive source file processing fails due to missing lastModifyingUser.displayName field
teynar opened this issue · 1 comments
teynar commented
The following access to the lastModifyingUser.displayName field fails
gerev/app/data_sources/google_drive.py
Line 183 in 20d0245
2023-03-27 10:05:46,340 | INFO | google_drive.py:140 | processing file ********************
2023-03-27 10:05:47,523 | ERROR | base_data_source.py:95 | Error while indexing data source
Traceback (most recent call last):
File "/app/data_source_api/base_data_source.py", line 93, in index
self._feed_new_documents()
File "/app/data_sources/google_drive.py", line 199, in _feed_new_documents
self._index_files_from_drive(drive)
File "/app/data_sources/google_drive.py", line 183, in _index_files_from_drive
author=file['lastModifyingUser']['displayName'],
KeyError: 'displayName'
Google's documentation DOES NOT mention that it may not be defined, but it was for me:
lastModifyingUser.displayName string A plain text displayable name for this user.
It is probably related to a user in a shared Google workspace that was deleted.