title: SocketError : Operation not permitted (returning py2neo exception)
body: <p>I am trying to return a bunch of rows to my web page with a render function in django, but I get the following error. </p>
  
  <pre><code>Request Method: POST
  Request URL: http://localhost:8000/neoapp/user_rec.html
  
  Django Version: 1.8.6
  Python Version: 2.7.10
  Installed Applications:
  ('django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'neoapp')
  Installed Middleware:
  ('django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware',
   'django.middleware.security.SecurityMiddleware')
  
  Traceback:
  File "C:\dev\web\neo\lib\site-packages\django\core\handlers\base.py" in get_response
    132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\dev\web\project\neoapp\views.py" in user_rec
    19.           m = graph.cypher.execute("""MATCH    (b:User)-[r:HAS_RATED]-&gt;(m:Movie), (b)-[s:SIMILARITY]-(a:User {userID:"""+str(uid)
  File "C:\dev\web\neo\lib\site-packages\py2neo\core.py" in cypher
    667.             metadata = self.resource.metadata
  File "C:\dev\web\neo\lib\site-packages\py2neo\core.py" in metadata
    213.             self.get()
  File "C:\dev\web\neo\lib\site-packages\py2neo\core.py" in get
    258.             response = self.__base.get(headers=headers, redirect_limit=redirect_limit, **kwargs)
  File "C:\dev\web\neo\lib\site-packages\py2neo\packages\httpstream\http.py" in get
    966.         return self.__get_or_head("GET", if_modified_since, headers, redirect_limit, **kwargs)
  File "C:\dev\web\neo\lib\site-packages\py2neo\packages\httpstream\http.py" in __get_or_head
    943.         return rq.submit(redirect_limit=redirect_limit, **kwargs)
  File "C:\dev\web\neo\lib\site-packages\py2neo\packages\httpstream\http.py" in submit
    433.             http, rs = submit(self.method, uri, self.body, self.headers)
  File "C:\dev\web\neo\lib\site-packages\py2neo\packages\httpstream\http.py" in submit
    362.             raise SocketError(code, description, host_port=uri.host_port)
  
  Exception Type: SocketError at /neoapp/user_rec.html
  Exception Value: Operation not permitted
  </code></pre>
  
  <p>The <strong>views</strong> file is - </p>
  
  <pre><code>from django.shortcuts import render
  from neomodel import StructuredNode, StructuredRel, RelationshipTo, RelationshipFrom, StringProperty, IntegerProperty, DateTimeProperty
  from models import *
  from forms import UserForm
  from py2neo import *
  
  def user_rec(request):
      if request.method == 'POST':
          form = UserForm(request.POST)
          if form.is_valid():
              # return render(request,'got_it.html',{
              #   'message':request.POST['userid']
              #   })
              uid = request.POST.get("userid")
  
              graph = Graph("https://neo4j:goel@localhost:7474/db/data/")
  
              m = graph.cypher.execute("""MATCH    (b:User)-[r:HAS_RATED]-&gt;(m:Movie), (b)-[s:SIMILARITY]-(a:User {userID:"""+str(uid)
      +"""}) WHERE    NOT((a)-[:RATED]-&gt;(m)) WITH m, s.similarity AS sim, r.rating AS rating ORDER BY m.name, rating DESC WITH m.name AS movie, 
  COLLECT(rating)[0..3] AS ratings WITH movie, REDUCE(s = 0, i IN ratings | s + i)*1.0 / LENGTH(ratings) AS reco  ORDER BY reco DESC
  RETURN   movie AS Movie, reco AS Recommendation limit 10""")
  
              return render(request,'reco.html',{
                  'm': m
                  })
  
      else:
  
          form = UserForm()
      return render(request, 'user_rec.html', {'form': form})
  </code></pre>
  
  <p>Why am I getting this <strong>py2neo</strong> exception? How can I otherwise run a query in my views.py file?</p>