title: ImportError: cannot import name _UNPACK_INT
body: <pre><code>from flask import Flask
  from flask import render_template
  from pymongo import MongoClient
  import json
  from bson import json_util
  from bson.json_util import dum
  
  app = Flask(__name__)
  
  
  MONGODB_HOST = 'localhost'
  MONGODB_PORT = 27017
  DBS_NAME = 'donorschoose'
  COLLECTION_NAME = 'projects'
  FIELDS = {'school_state': True, 'resource_type': True, 'poverty_level': True, 'date_posted': True, 'total_donations': True, '_id': False}
  
  @app.route('/')
  def index():
      return render_template("index.html")
  
  @app.route("/donorschoose/projects")
  def donorschoose_projects():
      connection = MongoClient(MONGODB_HOST, MONGODB_PORT)
      collection = connection[DBS_NAME][COLLECTION_NAME]
      projects = collection.find(projection=FIELDS)
      json_projects = []
      for project in projects:
          json_projects.append(project)
      json_projects = json.dumps(json_projects, default=json_util.default)
      connection.close()
      return json_projects
  
  
  if __name__ == "__main__":
      app.run(host='0.0.0.0',port=5000,debug=True)
  </code></pre>
  
  <p>This is the tutorial I am following: <a href="http://adilmoujahid.com/posts/2015/01/interactive-data-visualization-d3-dc-python-mongodb/">http://adilmoujahid.com/posts/2015/01/interactive-data-visualization-d3-dc-python-mongodb/</a></p>
  
  <p>Here is the error when I run the server.</p>
  
  <blockquote>
    <p>Traceback (most recent call last):   File "app.py", line 3, in
    &lt;module><br>
        from pymongo import MongoClient   File "/home/olalkeith/Documents/Github/myproject/venv/local/lib/python2.7/site-packages/pymongo/<strong>init</strong>.py",<br>
    line 83, in &lt;module><br>
        from pymongo.collection import ReturnDocument   File "/home/olalkeith/Documents/Github/myproject/venv/local/lib/python2.7/site-packages/pymongo/collection.py",<br>
    line 27, in &lt;module><br>
        from bson.raw_bson import RawBSONDocument   File "/home/olalkeith/Documents/Github/myproject/venv/local/lib/python2.7/site-packages/bson/raw_bson.py",<br>
    line 20, in &lt;module><br>
        from bson import _UNPACK_INT, _iterate_elements ImportError: cannot import name _UNPACK_INT  </p>
  </blockquote>