Skip to content

NoneType object has no attribute access_key #23

@jonded94

Description

@jonded94

I'm using a setup similar to what is described in #21 (comment).

Trying to interact with parquet data (the rest such as image files work fine) currently leads to error messages. In my custom logger setup, I could retrieve information about where this exception is raised:

{"timestamp": "2026-03-26 13:52:00,801", "level": "ERROR", "name": "smoosense.handlers.query", "message": "Query execution failed: 'NoneType' object has no attribute 'access_key'", "path": "/opt/uv-tools/gunicorn/lib/python3.14/site-packages/smoosense/handlers/query.py", "line": 44, "pid": 9}
Image

EDIT: I just realized that this error appears even with a S3Client set. For reference, this is my app.py:

import logging
import json
import sys

import boto3
from smoosense.app import SmooSenseApp


class JSONFormatter(logging.Formatter):
    def format(self, record: logging.LogRecord) -> str:
        return json.dumps(
            {
                "timestamp": self.formatTime(record),
                "level": record.levelname,
                "name": record.name,
                "message": record.getMessage(),
                "path": record.pathname,
                "line": record.lineno,
                "pid": record.process,
            }
        )


def configure_logging() -> None:
    handler = logging.StreamHandler(sys.stderr)
    handler.setFormatter(JSONFormatter())
    logging.root.handlers = [handler]
    logging.root.setLevel(logging.INFO)


configure_logging()

session = boto3.Session()
s3_client = session.client("s3")

app = SmooSenseApp(s3_client=s3_client).create_app()

This is installed in a Dockerfile such as:

COPY app.py gunicorn.conf.py /app/

RUN useradd -m -s /bin/bash -u 1000 linguee

USER 1000

EXPOSE 8000

CMD ["gunicorn", "app:app", "--config", "gunicorn.conf.py"]

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