Note that there are some explanatory texts on larger screens.

plurals
  1. POPython Connection with mongoHQ fails?
    primarykey
    data
    text
    <p>I want to connect to mongoHq database through python. here is what i have done so far</p> <p>an environmental variable is set:</p> <pre><code>MONGOHQ_URL = mongodb://myusername:mypassword@paulo.mongohq.com:10084/mydb </code></pre> <p>and the app.py file</p> <pre><code>import os import datetime import pymongo from pymongo import MongoClient MONGO_URL = os.environ.get('MONGOHQ_URL') client = MongoClient(MONGO_URL) db = client.mydb </code></pre> <p>when i run this file following error comes</p> <pre><code>Traceback (most recent call last): File "C:\Python33\lib\site-packages\pymongo-2.6.2-py3.3-win-amd64.egg\pymongo\mongo_client.py", line 349, in __init__ self.__find_node(seeds) File "C:\Python33\lib\site-packages\pymongo-2.6.2-py3.3-win-amd64.egg\pymongo\mongo_client.py", line 750, in __find_node raise AutoReconnect(', '.join(errors)) pymongo.errors.AutoReconnect: could not connect to localhost:27017: [WinError 10061] No connection could be made because the target machine actively refused it During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python33\flaskk\test.py", line 9, in &lt;module&gt; client = MongoClient(MONGO_URL) File "C:\Python33\lib\site-packages\pymongo-2.6.2-py3.3-win- amd64.egg\pymongo\mongo_client.py", line 352, in __init__ raise ConnectionFailure(str(e)) pymongo.errors.ConnectionFailure: could not connect to localhost:27017: [WinError 10061] No connection could be made because the target machine actively refused it </code></pre> <p>Please help !! Thanks in advance !!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload