Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception Value: must be psycopg2.extensions.connection, not None #78

Open
troygrosfield opened this issue May 11, 2016 · 1 comment
Open

Comments

@troygrosfield
Copy link

Getting an error with passing a connection == None with the latest in the master branch.

Traceback:

File "/python3.4/site-packages/django/core/handlers/base.py" in get_response
  149.                     response = self.process_exception_by_middleware(e, request)
File "/python3.4/site-packages/django/core/handlers/base.py" in get_response
  147.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/python3.4/site-packages/django/views/generic/base.py" in view
  68.             return self.dispatch(request, *args, **kwargs)
File "/python3.4/site-packages/django_core/views/mixins/paging.py" in dispatch
  27.         return super(PagingViewMixin, self).dispatch(*args, **kwargs)
File "/python3.4/site-packages/django/views/generic/base.py" in dispatch
  88.         return handler(request, *args, **kwargs)
File "/webapps/mm/app/search/views.py" in get
  27.             return self.form_valid(form=self.form)
File "/webapps/mm/app/search/views.py" in form_valid
  40.         return ListView.get(self, request=self.request)
File "/python3.4/site-packages/django/views/generic/list.py" in get
  159.         self.object_list = self.get_queryset()
File "/webapps/mm/app/search/views.py" in get_queryset
  87.                 **self.get_search_kwargs()
File "/webapps/mm/app/search/managers.py" in search
  38.                 headline_document=headline_document
File "/python3.4/site-packages/djorm_pgfulltext/models.py" in search
  129.         return self.get_queryset().search(*args, **kwargs)
File "/python3.4/site-packages/djorm_pgfulltext/models.py" in search
  315.                 "%s('%s', %s)" % (function, config, adapt(query))
File "/python3.4/site-packages/djorm_pgfulltext/utils.py" in adapt
  9.     a.prepare(connection.connection)

Exception Type: TypeError at /search
Exception Value: must be psycopg2.extensions.connection, not None
chrismarlow9 added a commit to chrismarlow9/djorm-ext-pgfulltext that referenced this issue Aug 7, 2016
default connection established with django settings credentials to psycopg2
chrismarlow9 added a commit to chrismarlow9/djorm-ext-pgfulltext that referenced this issue Aug 7, 2016
default connection established with django settings credentials to psycopg2
@chrismarlow9
Copy link

This was blocking production for me so I created a quick hack here:

https://github.com/chrismarlow9/djorm-ext-pgfulltext

Not sure if it's the proper solution (I don't know much around the connection pooling of psycopg2 or its internals, just a bare bones connection). Warning: use at your own risk in production, but it's working fine for me so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants