andreirk / django-hotclub

Automatically exported from code.google.com/p/django-hotclub
0 stars 0 forks source link

Mysterious "relation _avatar does not exist" issue with avatar and postgresql #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I mentioned on IRC that I had the issue two times as of yet. Now it
happened a third time. What I think is different from when it does not
happen is that the server is running for quite some time.

Maybe a traceback helps:

Environment:

Request Method: POST
Request URL: http://localhost:8000/account/login/
Django Version: 1.1 pre-alpha SVN-9112
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.humanize',
 'django.contrib.markup',
 'notification',
 'emailconfirmation',
 'django_extensions',
 'robots',
 'dbtemplates',
 'friends',
 'mailer',
 'messages',
 'announcements',
 'django_openidconsumer',
 'django_openidauth',
 'oembed',
 'crashlog',
 'pagination',
 'gravatar',
 'threadedcomments',
 'wiki',
 'swaps',
 'timezones',
 'feedutil',
 'app_plugins',
 'voting',
 'tagging',
 'bookmarks',
 'blog',
 'ajax_validation',
 'photologue',
 'avatar',
 'locations',
 'things',
 'flag',
 'analytics',
 'profiles',
 'zwitschern',
 'lifestream',
 'account',
 'tribes',
 'projects',
 'core',
 'things_app',
 'photos',
 'tag_app',
 'django.contrib.admin',
 'dictionary',
 'social_dict',
 'trainer']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django_openidconsumer.middleware.OpenIDMiddleware',
 'account.middleware.LocaleMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'pagination.middleware.PaginationMiddleware',
 'things_app.middleware.SortOrderMiddleware',
 'crashlog.CrashLogMiddleware',
 'django.middleware.transaction.TransactionMiddleware')

Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in
get_response
  86.                 response = callback(request, *callback_args,
**callback_kwargs)
File "/home/andi/projekte/django-hotclub/apps/local_apps/account/views.py"
in login
  18.         if form.login(request):
File "/home/andi/projekte/django-hotclub/apps/local_apps/account/forms.py"
in login
  47.             login(request, self.user)
File "/usr/lib/python2.5/site-packages/django/contrib/auth/__init__.py" in
login
  55.     user.save()
File "/usr/lib/python2.5/site-packages/django/db/models/base.py" in save
  307.         self.save_base(force_insert=force_insert,
force_update=force_update)
File "/usr/lib/python2.5/site-packages/django/db/models/base.py" in save_base
  390.                 created=(not record_exists), raw=raw)
File "/usr/lib/python2.5/site-packages/django/dispatch/dispatcher.py" in send
  148.             response = receiver(signal=self, sender=sender, **named)
File
"/home/andi/projekte/django-hotclub/apps/external_apps/avatar/__init__.py"
in update_email_hash
  9.     for avatar in instance.avatar_set.all():
File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
_result_iter
  179.                 self._fill_cache()
File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
_fill_cache
  612.                     self._result_cache.append(self._iter.next())
File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in iterator
  269.         for row in self.query.results_iter():
File "/usr/lib/python2.5/site-packages/django/db/models/sql/query.py" in
results_iter
  206.         for rows in self.execute_sql(MULTI):
File "/usr/lib/python2.5/site-packages/django/db/models/sql/query.py" in
execute_sql
  1724.         cursor.execute(sql, params)
File "/usr/lib/python2.5/site-packages/django/db/backends/util.py" in execute
  19.             return self.cursor.execute(sql, params)
File
"/usr/lib/python2.5/site-packages/django/db/backends/postgresql/base.py" in
execute
  52.         return self.cursor.execute(smart_str(sql, self.charset),
self.format_params(params))

Exception Type: ProgrammingError at /account/login/
Exception Value: FEHLER:  Relation »_avatar« existiert nicht

SELECT "_avatar"."id", "_avatar"."email_hash", "_avatar"."user_id",
"_avatar"."primary", "_avatar"."avatar", "_avatar"."date_uploaded" FROM
"_avatar" WHERE "_avatar"."user_id" = 1 

Original issue reported on code.google.com by AndreasK...@gmail.com on 8 Oct 2008 at 7:23

GoogleCodeExporter commented 9 years ago
And it goes away after a reload of the server, in this case I triggered the 
automatic
reload of the development server.

Original comment by AndreasK...@gmail.com on 8 Oct 2008 at 7:41

GoogleCodeExporter commented 9 years ago

Original comment by jtau...@gmail.com on 27 Oct 2008 at 10:48