Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when sometimes fetching comments from answers. #55

Open
goldiiman opened this issue Nov 6, 2016 · 0 comments
Open

Error when sometimes fetching comments from answers. #55

goldiiman opened this issue Nov 6, 2016 · 0 comments

Comments

@goldiiman
Copy link

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']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant