mk-fg / feedjack

Feedparser-based feed aggregation django app
BSD 3-Clause "New" or "Revised" License
8 stars 7 forks source link

Error: Invalid field name(s) given in select_related: 'post_processor_tags'. Choices are: (none) #4

Closed renpj closed 9 years ago

renpj commented 9 years ago

Invalid field name(s) given in select_related: 'post_processor_tags'. Choices are: (none)

Request Method: GET Request URL: http://192.168.56.190:8000/feedjack Django Version: 1.8 Exception Type: FieldError Exception Value:

Invalid field name(s) given in select_related: 'post_processor_tags'. Choices are: (none)

Exception Location: /usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py in get_related_selections, line 743

mk-fg commented 9 years ago

Thanks for the report.

Can you get a full traceback of that error?

Haven't ran the app with Django-1.8 myself, but the "field" is not used with select_related anywhere in the code explicitly, so I've no idea where this comes from. I think it might also be an easily reproducible thing with Django-1.8 (as often is the case with major django updates), so maybe I'll stumble upon it myself eventually.

renpj commented 9 years ago

here is the full traceback: Environment: Request Method: GET Request URL: http://192.168.56.190:8000/feedjack Django Version: 1.8 Python Version: 2.7.3 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'feedjack') 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 "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1. response = wrapped_callback(request, _callback_args, *_callback_kwargs) File "/usr/local/lib/python2.7/dist-packages/feedjack/views.py" in mainview
  2. (_mainview)(request, view_data, **criterias) File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/http.py" in inner
  3. response = func(request, _args, *_kwargs) File "/usr/local/lib/python2.7/dist-packages/feedjack/views.py" in _mainview
  4. ctx = fjlib.page_context(request, site, **criterias) File "/usr/local/lib/python2.7/dist-packages/feedjack/fjlib.py" in page_context
  5. if site.show_tagcloud and page.object_list: File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in nonzero
  6. return type(self).bool(self) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in bool
  7. self._fetch_all() File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in _fetch_all
  8. self._result_cache = list(self.iterator()) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in iterator
  9. results = compiler.execute_sql() File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in execute_sql
  10. sql, params = self.as_sql() File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in as_sql
  11. extra_select, order_by, group_by = self.pre_sql_setup() File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in pre_sql_setup
  12. self.setup_query() File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in setup_query
  13. self.select, self.klass_info, self.annotation_col_map = self.get_select() File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in get_select
  14. related_klass_infos = self.get_related_selections(select) File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in get_related_selections
  15. select, f.rel.to._meta, alias, cur_depth + 1, next, restricted) File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in get_related_selections
  16. ', '.join(_get_field_choices()) or '(none)',

Exception Type: FieldError at /feedjack Exception Value: Invalid field name(s) given in select_related: 'post_processor_tags'. Choices are: (none)

mk-fg commented 9 years ago

Should be fixed as of 91924b2 and 15.4.6, was indeed Django-1.8 incompatibility thing, thanks again for an early warning.