michaelbrooks / django-twitter-stream

Django app for streaming tweets from the Twitter API into a database.
MIT License
56 stars 17 forks source link

Nothing is stored in the database #3

Open acquayefrank opened 9 years ago

acquayefrank commented 9 years ago

Hi, I run : python manage.py stream but nothing is stored in my database. The terminal hangs for a while then finally shows this stacktrace

Exception in thread Thread-50: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in *bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(_self.__args, _self.__kwargs) File "/home/larry/Documents/Projects/houdini/env/local/lib/python2.7/site-packages/tweepy/streaming.py", line 157, in _run conn.connect() File "/usr/lib/python2.7/httplib.py", line 1176, in connect self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file) File "/usr/lib/python2.7/ssl.py", line 487, in wrap_socket ciphers=ciphers) File "/usr/lib/python2.7/ssl.py", line 243, in __init** self.do_handshake() File "/usr/lib/python2.7/ssl.py", line 405, in do_handshake self._sslobj.do_handshake() error: [Errno 104] Connection reset by peer

michaelbrooks commented 9 years ago

I'm looking into it -- can you post the output of pip freeze so I can check what versions of tweepy and other packages you have?

michaelbrooks commented 9 years ago

I was able to get it to work in a test project on Ubuntu, but I added some new stuff to the Readme that was missing. I don't think any of that stuff is related to this problem though.

It looks like tweepy is having a problem connecting to Twitter over SSL. Is there anything unusual with your network setup?

acquayefrank commented 9 years ago

Django==1.7 Fabric==1.6.1 Jinja2==2.7.3 MarkupSafe==0.23 Pygments==1.6 South==1.0.1 Sphinx==1.1.3 argparse==1.2.1 django-appconf==0.6 django-bootstrap3==4.11.0 django-compressor==1.3 django-debug-toolbar==1.2.1 django-jsonview==0.4.3 django-mongodb-engine==0.5.2 django-suit==0.2.8 -e git+https://github.com/michaelbrooks/django-twitter-stream.git@14dd7c1e4c958d9fa6853ce666d1bddc576d6ed2#egg=django_twitter_stream-master djangotoolbox==1.6.2 docutils==0.12 ecdsa==0.11 mongoengine==0.8.7 oauthlib==0.7.1 paramiko==1.15.1 pycrypto==2.6.1 pymongo==2.7.2 python-twitter==2.0 requests==2.4.3 requests-oauthlib==0.4.2 simplejson==3.6.5 six==1.8.0 sqlparse==0.1.13 swapper==0.1.1 tweepy==2.3.0 twitter-monitor==0.2.2 twython==3.2.0 wsgiref==0.1.2

michaelbrooks commented 9 years ago

Hm, I thought it might be something with Django 1.7 (I've only tested it on Django 1.6) but it seems to be working anyway with 1.7, and you have the same version of Tweepy that I do as well.

I don't think this is a problem with django-twitter-stream, rather with something about your system configuration. Are you able to connect to the Twitter API from your machine? Do the tweepy examples work?