Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Seeing error: type object 'Clipboard' has no attribute 'base_objects' #278

chrisfong opened this Issue · 8 comments

7 participants

Chris Stefan Foulis Juho Rutila Eric Ressler Muhia Njoroge Thiago Paiva Brito Andrzej Kostanski

Getting this error when clicking into a folder in the Filer plugin in Django Admin. Can someone point me in the right direction? Thanks.


Request Method: GET
Request URL: http://app.locals/admin/filer/folder/1/list/

Django Version: 1.4.3
Python Version: 2.7.2
Installed Applications:
Installed Middleware:

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/" in _wrapped_view_func
  89.         response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/" in inner
  196.             return view(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/filer/admin/" in directory_listing
  293.         for f in file_qs:
File "/usr/local/lib/python2.7/dist-packages/django/db/models/" in _result_iter
  118.                 self._fill_cache()
File "/usr/local/lib/python2.7/dist-packages/django/db/models/" in _fill_cache
  892.                     self._result_cache.append(
File "/usr/local/lib/python2.7/dist-packages/polymorphic/" in iterator
  243.             real_results = self._get_real_instances(base_result_objects)
File "/usr/local/lib/python2.7/dist-packages/polymorphic/" in _get_real_instances
  174.             qs = modelclass.base_objects.filter(pk__in=idlist) # use pk__in instead ####

Exception Type: AttributeError at /admin/filer/folder/1/list/
Exception Value: type object 'Clipboard' has no attribute 'base_objects'
Stefan Foulis

Sorry for the late response @chrisfong . Did you find a solution? I've not encountered this error before and can't reproduce it.

What version of django and django_polymorphic are you using?

Juho Rutila

I am having this same issue with
django-filer 0.9.3
django-polymorphic 0.4.0

I do not have the reproduction steps yet, though.

Stefan Foulis

I suspect his has something to do with django ContentType pks being mixed up. Maybe after loading a dbdump?

Juho Rutila

Definitely. I had wrong polymorphic_ctype_id in filer_file table.
I did do some database dumping and restoring and must have screwed it there.
Everything works now that I changed the polymorphic_ctype_id.

Eric Ressler

I just ran into this same issue after trying to load data from a dumpdata output. Doing a dump data using natural keys will also prevent this issue from occurring.

./ dumpdata filer > filer.json --natural --indent 4
Muhia Njoroge

Hello Guys,

I have the same problem with a django shop app, after doing the a restore, how exactly do i fix this in the database, how to change the polymorphic_ctype_id,

Thanks guys

Thiago Paiva Brito

It appears that setting the "polymorphic_ctype_id" to the ContentType relative to filer.file works.

Andrzej Kostanski

For me following the hint of eressler about using --natural was the way to go. THANKS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.