Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7961403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:01:23+00:00 2026-06-04T05:01:23+00:00

I’ve been stuck with diagnosing this for a few hours now and thought I’d

  • 0

I’ve been stuck with diagnosing this for a few hours now and thought I’d see if any pymongo experts out there have any ideas:

The following line of code:

connection = pymongo.Connection(‘localhost’, 27017)

Generates the following error:

/usr/local/Cellar/python/2.7.3/bin/python2.7 /Users/danwilson/Dropbox/Projects/mysite/app.py
Traceback (most recent call last):
File “/Users/danwilson/Dropbox/Projects/mysite/app.py”, line 149, in
main()
File “/Users/danwilson/Dropbox/Projects/mysite/app.py”, line 144, in main
http_server = tornado.httpserver.HTTPServer(Application())
File “/Users/danwilson/Dropbox/Projects/mysite/app.py”, line 54, in init
self.connection = pymongo.Connection(‘localhost’, 27017)
File “/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/pymongo/connection.py”, line 290, in init
self.__find_node()
File “/usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/pymongo/connection.py”, line 586, in __find_node
raise AutoReconnect(‘, ‘.join(errors))
pymongo.errors.AutoReconnect: ‘module’ object has no attribute ‘decode_all’

mongod’s streaming output acknowledges the connection:

My-MacBook-Pro:~ username$ mongod
mongod –help for help and startup options
Tue May 15 07:53:50 [initandlisten] MongoDB starting : pid=2277 port=27017 dbpath=/data/db/ 64-bit host=My-MacBook-Pro.local
Tue May 15 07:53:50 [initandlisten] db version v2.0.5, pdfile version 4.5
Tue May 15 07:53:50 [initandlisten] git version: 1bb4de4630302fad8af53824ca4f627db490b753
Tue May 15 07:53:50 [initandlisten] build info: Darwin erh2.10gen.cc 9.8.0 Darwin Kernel
Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Tue May 15 07:53:50 [initandlisten] options: {}
Tue May 15 07:53:50 [initandlisten] journal dir=/data/db/journal
Tue May 15 07:53:50 [initandlisten] recover : no journal files present, no recovery needed
Tue May 15 07:53:50 [websvr] admin web console waiting for connections on port 28017
Tue May 15 07:53:50 [initandlisten] waiting for connections on port 27017
Tue May 15 07:53:57 [initandlisten] connection accepted from 127.0.0.1:50263 #1
Tue May 15 07:53:57 [conn1] end connection 127.0.0.1:50263

Package Versions

My-MacBook-Pro:~ username$ pip freeze
PyYAML==3.10
bson==0.3.3
distribute==0.6.26
mimeparse==0.1.3
pymongo==2.2
python-dateutil==2.1
pytz==2012c
six==1.1.0
tornado==2.2.1
virtualenv==1.7.1.2
wsgiref==0.1.2

MongoDB version

My-MacBook-Pro:~ username$ brew info mongodb
mongodb 2.0.5-x86_64
http://www.mongodb.org/
/usr/local/Cellar/mongodb/2.0.5-x86_64 (17 files, 121M) *
https://github.com/mxcl/homebrew/commits/master/Library/Formula/mongodb.rb

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:01:24+00:00Added an answer on June 4, 2026 at 5:01 am

    The solution to this problem was not good news for pip: I had to uninstall pymongo and bson, then reinstall bson, then pymongo. So it looks like the order of installation is actually important!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.