Skip to content

Google Drive source file processing fails due to missing lastModifyingUser.photoLink field #64

@teynar

Description

@teynar

The following access to the lastModifyingUser.photoLink field fails

author_image_url=file['lastModifyingUser']['photoLink'],

2023-03-27 09:26:51,039 | INFO | google_drive.py:140 | processing file ********************
2023-03-27 09:26:52,481 | 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 184, in _index_files_from_drive
    author_image_url=file['lastModifyingUser']['photoLink'],
KeyError: 'photoLink'

Google's documentation mentions that it may not be defined:
lastModifyingUser.photoLink string A link to the user's profile photo, if available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions