FS#23228 - {archweb} DoesNotExist: ContentType matching query does not exist.
Attached to Project:
Arch Linux
Opened by Dieter Plaetinck (Dieter_be) - Thursday, 10 March 2011, 21:13 GMT
Last edited by Dan McGee (toofishes) - Monday, 31 December 2012, 15:50 GMT
Opened by Dieter Plaetinck (Dieter_be) - Thursday, 10 March 2011, 21:13 GMT
Last edited by Dan McGee (toofishes) - Monday, 31 December 2012, 15:50 GMT
|
Details
archweb, latest from git, master branch.
(1dc867587da6b66ca575eb26f4f65cb9d67ffdb3)
I try to set it up, following all instructions in the README for `# Testing Installation` It seems to work, until this step: (archweb-env)22:09:00 dieter@ws archweb master ? ./manage.py loaddata main/fixtures/groups.json Installing json fixture 'main/fixtures/groups' from absolute path. Problem installing fixture 'main/fixtures/groups.json': Traceback (most recent call last): File "/home/dieter/workspaces/eclipse/archweb-env/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 169, in handle for obj in objects: File "/home/dieter/workspaces/eclipse/archweb-env/lib/python2.7/site-packages/django/core/serializers/json.py", line 35, in Deserializer for obj in PythonDeserializer(simplejson.load(stream), **options): File "/home/dieter/workspaces/eclipse/archweb-env/lib/python2.7/site-packages/django/core/serializers/python.py", line 105, in Deserializer m2m_data[field.name] = [m2m_convert(pk) for pk in field_value] File "/home/dieter/workspaces/eclipse/archweb-env/lib/python2.7/site-packages/django/core/serializers/python.py", line 100, in m2m_convert return field.rel.to._default_manager.db_manager(db).get_by_natural_key(*value).pk File "/home/dieter/workspaces/eclipse/archweb-env/lib/python2.7/site-packages/django/contrib/auth/models.py", line 50, in get_by_natural_key content_type=ContentType.objects.get_by_natural_key(app_label, model) File "/home/dieter/workspaces/eclipse/archweb-env/lib/python2.7/site-packages/django/contrib/contenttypes/models.py", line 15, in get_by_natural_key ct = self.get(app_label=app_label, model=model) File "/home/dieter/workspaces/eclipse/archweb-env/lib/python2.7/site-packages/django/db/models/manager.py", line 132, in get return self.get_query_set().get(*args, **kwargs) File "/home/dieter/workspaces/eclipse/archweb-env/lib/python2.7/site-packages/django/db/models/query.py", line 347, in get % self.model._meta.object_name) DoesNotExist: ContentType matching query does not exist. |
This task depends upon
Closed by Dan McGee (toofishes)
Monday, 31 December 2012, 15:50 GMT
Reason for closing: Works for me
Monday, 31 December 2012, 15:50 GMT
Reason for closing: Works for me
local/python-virtualenv 1.5.1-2
Virtual Python Environment builder
22:22:03 dieter@ws archweb master ? pacman -Qs python2
local/python2 2.7.1-7
A high-level scripting language
local/python2-distribute 0.6.14-2
A collection of extensions to the Python 2 distutils
local/python2-numpy 1.5.1-2
Scientific tools for Python
local/python2-qt 4.8.3-1
A set of Python 2 bindings for the Qt toolkit
local/python2-sip 4.12.1-1
A tool that makes it easy to create Python 2 bindings for C and C++ libraries
There is some oddness with the permissions and content type migrations due to a refactoring a while back, it appears. I took a quick look but there isn't a super quick fix- the particular permission and content type it is blowing up on is the news stuff, so if you just delete the two arrays in that json file dealing with news (add_news and change_news), you should be able to work around the problem for now.
./manage.py reset contenttypes (answer yes)
./manage.py loaddata contenttypes.json
(archweb-env)[~/source/archweb]% ./manage.py loaddata */fixtures/*.json
Problem installing fixture 'main/fixtures/groups.json': Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 169, in handle
for obj in objects:
File "/usr/lib/python2.7/site-packages/django/core/serializers/json.py", line 35, in Deserializer
for obj in PythonDeserializer(simplejson.load(stream), **options):
File "/usr/lib/python2.7/site-packages/django/core/serializers/python.py", line 105, in Deserializer
m2m_data[field.name] = [m2m_convert(pk) for pk in field_value]
File "/usr/lib/python2.7/site-packages/django/core/serializers/python.py", line 100, in m2m_convert
return field.rel.to._default_manager.db_manager(db).get_by_natural_key(*value).pk
File "/usr/lib/python2.7/site-packages/django/contrib/auth/models.py", line 61, in get_by_natural_key
content_type=ContentType.objects.get_by_natural_key(app_label, model)
File "/usr/lib/python2.7/site-packages/django/db/models/manager.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 349, in get
% self.model._meta.object_name)
DoesNotExist: Permission matching query does not exist
- [
- "add_signoff",
- "main",
- "signoff"
- ],