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

Update db.py #11

Merged
merged 1 commit into from
Nov 5, 2022
Merged

Update db.py #11

merged 1 commit into from
Nov 5, 2022

Conversation

Tortar
Copy link

@Tortar Tortar commented Jul 14, 2022

this should fix issue #3 (comment)

this should fix issue minamotorin#3 (comment)
@minamotorin
Copy link
Owner

When I opened #3, I seem to have misunderstood config.Database="filename" as twint.run.db, sorry.
I don't know what was the problem with db.py, but I will merge this PR if I understand it.

@Tortar
Can you show me an example code for the problem resolved in this PR?

@minamotorin minamotorin added bug Something isn't working help wanted Extra attention is needed labels Jul 19, 2022
@Tortar
Copy link
Author

Tortar commented Jul 19, 2022

Yes, here it is:

Writing in terminal twint -s a -db a.db gives

File "\.", line 293, in tweets
    cursor.execute(query, (Tweet.id, int(reply['user_id']), reply['username']))
KeyError: 'user_id'

after fixing it, the program will throw exceptions on the other two lines of code because Tweet.mentions is a list of dicts and so the join method can't be used on it without first converting the dicts in strings, while Tweet.place is a dict and so can't be inserted in the db if you don't convert it to string.

@minamotorin
Copy link
Owner

@Tortar
Thanks! I confirmed the behavior.
But I think it's better to put this PR on hold.
The reason is followings.

After fixing #13 completely, if this PR still useful, I'll merge this PR.

Any other opinions are welcome.

minamotorin added a commit that referenced this pull request Jul 20, 2022
@minamotorin
Copy link
Owner

I merge this because I think #13 isn't fixed for a while.

@minamotorin minamotorin merged commit 2501890 into minamotorin:master Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants