Skip to content

Content Negotiation fails with TypeError for non-dois #83

Closed
@goerz

Description

@goerz

Content negotiation throws a TypeError if it is called as e.g.

habanero.cn.content_negotiation(query_bibliographic=query, limit=1)

whith some string query. This is due to the definition of CNRequest:

def CNRequest(url, ids = None, format = None, style = None,
        locale = None, **kwargs):

    ...

    if(len(ids) == 1):
        ...

With the above call, ids is passed as None, and the query is in the kwargs. The line that takes the len of ids then fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions