Find answers from the community

Updated last year

Google docs is working but google drive

Google docs is working but google drive reader is not working

Plain Text
from llama_index import download_loader

GoogleDriveReader = download_loader('GoogleDriveReader')

loader = GoogleDriveReader()
documents = loader.load_data(file_ids=['file_id'])

OUTPUT:
TypeError: GoogleDriveReader._load_from_file_ids() takes 2 positional arguments but 3 were given




Notion reader is also giving an error.

Plain Text
from llama_index import GPTListIndex, NotionPageReader
from IPython.display import Markdown, display
import os
integration_token = 'notion_integration_token'
page_ids = ["page_id"]
notion_reader = NotionPageReader(integration_token=integration_token)
documents = notion_reader.read_page(page_id=page_ids)

OUTPUT:
~/.local/lib/python3.10/site-packages/llama_index/readers/notion.py in _read_block(self, block_id, num_tabs)
     58             data = res.json()
     59 
---> 60             for result in data["results"]:
     61                 result_type = result["type"]
     62                 result_obj = result[result_type]

KeyError: 'results'



Please anyone help me with this. @jerryjliu0 @Logan M @ravitheja
L
r
A
13 comments
These loaders weren't created by us, I'm not sure what the issue is πŸ˜… But I recommend debugging to make a PR if possible, otherwise I can add it to my (very large) to-do list
@Ashish kumar are you still facing issues with google drive?
@ravitheja yes with same error
mime_types is another argument that is needed I guess. I need to update the documentation. Can you try including mime_types in list and see if that is working? @Ashish kumar
Attachment
image.png
I have passed like this but still i am getting the same error
Plain Text
documents = loader.load_data(file_ids=['file_id'], mime_types=['application/vnd.openxmlformats-officedocument.wordprocessingml.document'])

Error
Plain Text
TypeError                                 Traceback (most recent call last)
TypeError: GoogleDriveReader._load_from_file_ids() takes 2 positional arguments but 3 were given
okay.
documents = loader.load_data(folder_id=None, file_ids=['file_id'], mime_types=['application/vnd.openxmlformats-officedocument.wordprocessingml.document'])
@Ashish kumar try this out?
@ravitheja
still same error
@ravitheja
tried with below code without passing parameters as well
Plain Text
documents = loader.load_data()

but same error
version is llama-index==0.6.31
okay. Let me connect you over DM.
Add a reply
Sign up and join the conversation on Discord