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.photoLink field #64

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

Comments

@teynar
Copy link
Contributor

teynar commented Mar 27, 2023

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.

@Roey7
Copy link
Contributor

Roey7 commented Mar 27, 2023

thanks

@Roey7 Roey7 closed this as completed in #65 Mar 27, 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