Skip to content

Breaking change: requests 2.34.0 breaks GET requests without params in SDK #492

@prasad-albert

Description

@prasad-albert

Summary

requests 2.34.0 (psf/requests#7429) changed Session.get() to pass params=None explicitly to request(). This exposed a latent bug in the SDK's session layer that causes all no-param GET requests (e.g. get_by_id across all collections) to crash with:

AttributeError: 'NoneType' object has no attribute 'items'

Who is affected

Users with requests>=2.34.0 in their environment — e.g. from a recent pip install --upgrade or a fresh install without a pinned lockfile. Users with requests pinned to <=2.33.x are not affected.

Fix

This is resolved in albert==1.23.1. Upgrade immediately:

pip install albert==1.23.1

Temporary workaround (if you cannot upgrade the SDK right away):

pip install "requests<2.34.0"

Root cause

requests 2.34.0 moved params from **kwargs into an explicit typed parameter with a default of None in Session.get(). This meant params=None was always forwarded to our AlbertSession.request() override, where _encode_query_params assumed it would always receive a dict and crashed on .items().

The fix is a one-liner in session.py — no API or interface changes.

Please comment below or reach out directly if you need any help.

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