Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Drive source file processing fails due to missing lastModifyingUser.displayName field #67

Closed
teynar opened this issue Mar 27, 2023 · 1 comment · Fixed by #68
Closed

Comments

@teynar
Copy link
Contributor

teynar commented Mar 27, 2023

The following access to the lastModifyingUser.displayName field fails

author=file['lastModifyingUser']['displayName'],

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.

@Roey7
Copy link
Contributor

Roey7 commented Mar 27, 2023

@teynar left a comment there

@Roey7 Roey7 closed this as completed in #68 Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants