GithubHelp home page GithubHelp logo

list index out of range error about twecoll HOT 8 CLOSED

jdevoo avatar jdevoo commented on August 18, 2024
list index out of range error

from twecoll.

Comments (8)

lucahammer avatar lucahammer commented on August 18, 2024

This happens when there is an empty line in the .dat file. I am not sure yet when they happen but a quick fix is to remove the empty line and start the fetch command again.

from twecoll.

jasonkgreen avatar jasonkgreen commented on August 18, 2024

Thanks. This seems to have solved it.

from twecoll.

jdevoo avatar jdevoo commented on August 18, 2024

Thank you @lucahammer ! I wonder how these empty lines come about... Any chance you can share the handle to reproduce this @jasonkgreen ?

from twecoll.

lucahammer avatar lucahammer commented on August 18, 2024

For the first time I was able to reproduce the error. It's probably something in the location field. Example of an account where the error happens: https://twitter.com/Atomroflbomber

from twecoll.

lucahammer avatar lucahammer commented on August 18, 2024

I am testing location = data['location'].strip() in line 399 as a fix. Didn't have the problem again, but will test it some more before submitting a PR. I wonder if there are cases where it doesn't work because the problematic characters are surrounded by the location text. Then it would be better to replace \n and \t.

from twecoll.

lucahammer avatar lucahammer commented on August 18, 2024

As expected it wasn't enough. This account triggered another out of range error: https://twitter.com/luXus_Suizid.

I added the following as a workaround.
location = location.replace('\n', ' ') location = location.replace('\t', ' ')

from twecoll.

jdevoo avatar jdevoo commented on August 18, 2024

cool - we can probably chain them into a single line... wonder if this needs to be applied to other attributes as well

from twecoll.

jdevoo avatar jdevoo commented on August 18, 2024

made the change but left out the tab case.

from twecoll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.