run-llama/llama_index · error · NotImplementedError

{self.__class__.__name__} does not provide get_permission_in

Error message

{self.__class__.__name__} does not provide get_permission_info method currently

What it means

BaseReader.get_permission_info(resource_id) is an optional hook returning permission details for one resource; the base class raises NotImplementedError naming the subclass. The async wrapper aget_permission_info simply forwards to it via to_thread.

Source

Thrown at llama-index-core/llama_index/core/readers/base.py:92

        """

    async def alist_resources(self, *args: Any, **kwargs: Any) -> List[str]:
        """
        List of identifiers for the specific type of resources available in the reader asynchronously.

        Returns:
            List[str]: A list of resources based on the reader type, such as files for a filesystem reader,
            channel IDs for a Slack reader, or pages for a Notion reader.

        """
        return await asyncio.to_thread(self.list_resources, *args, **kwargs)

    def get_permission_info(self, resource_id: str, *args: Any, **kwargs: Any) -> Dict:
        """
        Get a dictionary of information about the permissions of a specific resource.
        """
        raise NotImplementedError(
            f"{self.__class__.__name__} does not provide get_permission_info method currently"
        )

    async def aget_permission_info(
        self, resource_id: str, *args: Any, **kwargs: Any
    ) -> Dict:
        """
        Get a dictionary of information about the permissions of a specific resource asynchronously.
        """
        return await asyncio.to_thread(
            self.get_permission_info, resource_id, *args, **kwargs
        )

    @abstractmethod
    def get_resource_info(self, resource_id: str, *args: Any, **kwargs: Any) -> Dict:
        """
        Get a dictionary of information about a specific resource.

View on GitHub (pinned to afd0fef371)

Solutions

  1. Guard with hasattr/inspect before calling: only call when the subclass overrides get_permission_info
  2. Implement get_permission_info(self, resource_id) in your custom reader, returning e.g. {"read": True, ...}
  3. If you control the caller, feature-detect: `type(reader).get_permission_info is not BaseReader.get_permission_info`

Example fix

// before
info = reader.get_permission_info(resource_id="file:///data")  # raises

// after
if type(reader).get_permission_info is not BaseReader.get_permission_info:
    info = reader.get_permission_info(resource_id="file:///data")
else:
    info = {"supported": False}
Defensive patterns

Strategy: type-guard

Validate before calling

from llama_index.core.readers.base import BaseReader

def reader_supports_permission_info(reader: BaseReader) -> bool:
    return type(reader).get_permission_info is not BaseReader.get_permission_info

if reader_supports_permission_info(reader):
    info = reader.get_permission_info(resource_id)
else:
    info = {"supported": False, "resource_id": resource_id}

Type guard

def is_permission_aware(reader) -> bool:
    """True when the subclass overrides get_permission_info."""
    from llama_index.core.readers.base import BaseReader
    return (
        isinstance(reader, BaseReader)
        and type(reader).get_permission_info is not BaseReader.get_permission_info
    )

Prevention

When it happens

Trigger: Calling reader.get_permission_info(...) or awaiting reader.aget_permission_info(...) on a reader (built-in or custom) that does not implement permission reporting — only resource permission aware readers do.

Common situations: Building agent/UI flows that enumerate reader permissions generically (list_resources works, then get_permission_info fails because that reader only implemented list_resources); treating the hook as mandatory.

Related errors


AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15). Data as JSON: /api/errors/c27da36a3099d10b. Report an issue: GitHub.