Skip to content

OEIS JSONDecodeError #103

@kwangzera

Description

@kwangzera

I got an internal error when I tried =oeis \. So I took a look at oeis.py and found:

async with aiohttp.ClientSession() as session:
    params = {
        'q': query,
        'start': 0,
        'fmt': 'json'
    }
    async with session.get('https://oeis.org/search', params=params, timeout=10) as req:
        j = await req.json()

It seems that when query="\\", OEIS returns <b>Could not parse search query: empty query</b>, resulting in req.json() causing a JSONDecodeError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions