Skip to content

Error when sometimes fetching comments from answers. #55

@goldiiman

Description

@goldiiman

I sometimes get an error when I fetch the comments from answers

It complains of missing key user_id, so the json must have an owner attr but the owner not have a user_id. this was the json that failed so explains the error, I added try / except but it would nice to know about the issue (closed user account?)

{'display_name': 'user****', 'user_type': 'does_not_exist'}

        if hasattr(json, 'owner'):
            try:
                self.owner_id = json.owner['owner_id'] if 'owner_id' in json.owner else json.owner['user_id']

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