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

streaming error #74

Closed
flinches opened this issue Jul 9, 2015 · 12 comments
Closed

streaming error #74

flinches opened this issue Jul 9, 2015 · 12 comments

Comments

@flinches
Copy link

flinches commented Jul 9, 2015

Hello,

I am using your script for school and I noticed when running it as library for streaming, it sometimes (one per minute) raise error (ERROR:root:json parse error: No JSON object could be decoded - ). Can I ask you what to do with that to make it work properly?

Thanks a lot.

Filip Hadac

@flinches
Copy link
Author

flinches commented Jul 9, 2015

Is it this?

Blank lines
On slow streams, some messages may be blank lines which serve as “keep-alive” signals to prevent clients and other network infrastructure from assuming the stream has stalled and closing the connection.

@edsu
Copy link
Member

edsu commented Jul 9, 2015

Yes, exactly. It would be useful for twarc not to log these that way right? They won't get written to the data output incidentally.

@edsu
Copy link
Member

edsu commented Jul 9, 2015

Also, I'm kind of curious to hear how you are using twarc in school, since I work in a university setting where we've been thinking about instructional uses of twitter data collection.

@edsu edsu closed this as completed in 37efa58 Jul 9, 2015
@edsu
Copy link
Member

edsu commented Jul 9, 2015

I'm just pushed this up to PyPI too as v0.3.2 if you have installed twarc via pip. Let me know if you notice any problems!

@flinches
Copy link
Author

flinches commented Jul 9, 2015

Thanks. It seems to be ok now. And I use it in school for some research group. They gave me project to streaming data from Twitter for many keywords, saving them to files and then next working with it.

@edsu
Copy link
Member

edsu commented Jul 9, 2015

Excellent, that's just the use case it was created for. If you go looking for an app to manage data collection like this you might be interested in https://github.com/gwu-libraries/social-feed-manager which manages stuff for you, and pretty much lets the researchers decide what to collect.

@flinches
Copy link
Author

flinches commented Jul 9, 2015

Oh thanks. I will look at it and consider usage.

@flinches
Copy link
Author

Hello,

can I ask you one question? I have another problem, but i don't know if it is mine or yours. I am getting error 406: Not Acceptable. First time I got it after cca 66 hours and second time it was after cca 86 hours of streaming. I am still using Twarc as library and cannot find anything what could help me. Everything worked well but after that time there was error and then it was just repeating this error. Do you know where could be a problem?

Thanks a lot.

Filip Hadac

@edsu
Copy link
Member

edsu commented Jul 28, 2015

Interesting, did you can get any kind of stack trace to indicate where the error was happening? It looks like the Search API can return a 406 if the format is invalid? We've been noticing spurious 404 errors from Twtiter over in #75. Maybe this is similar/related?

@flinches
Copy link
Author

I cannot get stack trace now, because I already quit application and run it again, because I am already using it to stream data what we need. Also it is not easy to debug it for me because it is running on server and error is often after 3 days. But i will implement some stack trace to script for next run and will see.

@edsu
Copy link
Member

edsu commented Jul 28, 2015

If you run it in a screen session you should be able to reconnect after a few days and see the stack trace. If you want I can update the catch-404 branch to also catch 406, and see if that helps you?

@flinches
Copy link
Author

It is ok. I will try it once more and if it fails again, I will let you know and then you can update it. But thanks.

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

2 participants