Skip to content

data2spreadsheet #1

Open
Open

Description

@chrism91

data2spreadsheet returns KeyError: "user"

any thoughts? didn't have issue on other system, am I missing a module?

Chris

Activity

  1. computermacgyver commented on May 26, 2015

    @computermacgyver
    Owner

    Probably a json object that isn't a tweet (i.e., is a delete message or a limit message, etc.) and hence doesn't have a "user" object in it. This should be dug into further (e.g., if it's a delete message we should actually update the code to delete the corresponding tweet). As a quick fix, however, try changing

    def parse(tweet):
        tw=Tweet()
    

    to

    def parse(tweet):
        if not "user" in tweet:
            return
        tw=Tweet()
    

    which will just skip the lines that don't have a 'user' object in them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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