karpathy / arxiv-sanity-preserver

Web interface for browsing, search and filtering recent arxiv submissions
http://www.arxiv-sanity.com/
MIT License
5.14k stars 1.33k forks source link

Unable to run serve.py file #110

Closed ckeshava closed 6 years ago

ckeshava commented 6 years ago

I am using python3. I was able to succesfully run all the files except for serve.py. I getting the following error - pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused

I checked at /var/lib/, I do not have mongodb installed. Any idea as to what causes this issue? The following is the output from the terminal:

/home/chenna/anaconda3/lib/python3.6/site-packages/flask_limiter/extension.py:113: UserWarning: Use of the default get_ipaddr function is discouraged. Please refer to https://flask-limiter.readthedocs.org/#rate-limit-domain for the recommended configuration " for the recommended configuration", UserWarning /home/chenna/anaconda3/lib/python3.6/site-packages/flask_limiter/extension.py:640: UserWarning: global_limits was a badly name configuration since it is actually a default limit and not a globally shared limit. Use default_limits if you want to provide a default or use application_limits if you intend to really have a global shared limit " if you intend to really have a global shared limit", UserWarning Namespace(num_results=200, port=5000, prod=False) loading the paper database db2.p loading tfidf_meta tfidf_meta.p loading paper similarities sim_dict.p loading user recommendations user_sim.p loading serve cache... serve_cache.p connecting to mongodb... Traceback (most recent call last): File "serve.py", line 689, in print('mongodb tweets_top1 collection size:', tweets_top1.count()) File "/home/chenna/anaconda3/lib/python3.6/site-packages/pymongo/collection.py", line 1560, in count return self._count(cmd, collation, session) File "/home/chenna/anaconda3/lib/python3.6/site-packages/pymongo/collection.py", line 1504, in _count with self._socket_for_reads() as (sock_info, slave_ok): File "/home/chenna/anaconda3/lib/python3.6/contextlib.py", line 81, in enter return next(self.gen) File "/home/chenna/anaconda3/lib/python3.6/site-packages/pymongo/mongo_client.py", line 982, in _socket_for_reads server = topology.select_server(read_preference) File "/home/chenna/anaconda3/lib/python3.6/site-packages/pymongo/topology.py", line 224, in select_server address)) File "/home/chenna/anaconda3/lib/python3.6/site-packages/pymongo/topology.py", line 183, in select_servers selector, server_timeout, address) File "/home/chenna/anaconda3/lib/python3.6/site-packages/pymongo/topology.py", line 199, in _select_servers_loop self._error_message(selector)) pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused

ckeshava commented 6 years ago

I was not aware that I had to install and run mongodb in the background. I could resolve this issue after starting mongodb