Opened 10 years ago
Closed 10 years ago
#23917 closed Bug (invalid)
RuntimeError Conflicting
Reported by: | None | Owned by: | None |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Sometimes I get errors like this:
RuntimeError: Conflicting 'event_deferred_description_description_en_descriae804c3400b52ecb4181ed6574468538' models in application 'ticket': <class 'ticket.models.event.Event_Deferred_description_description_en_descriae804c3400b52ecb4181ed6574468538'> and <class 'ticket.models.event.Event_Deferred_description_description_en_descriae804c3400b52ecb4181ed6574468538'>.
or this:
RuntimeError: Conflicting 'event_deferred_description' models in application 'ticket': <class 'ticket.models.event.Event_Deferred_description'> and <class 'ticket.models.event.Event_Deferred_description'>.
It has appeared after migrating to django 1.7.
Where and how I can find reason to fix this mistake?
Change History (5)
comment:1 by , 10 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
Internal Server Error: /cabinet/purchased/11534/tickets/ Traceback (most recent call last): File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view return self.dispatch(request, *args, **kwargs) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/utils/decorators.py", line 29, in _wrapper return bound_func(*args, **kwargs) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view return view_func(request, *args, **kwargs) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in bound_func return func.__get__(self, type(self))(*args2, **kwargs2) File "/home/tc/www/ticket/ticket/views/user.py", line 107, in dispatch pk=kwargs['payment_id'], user=request.user, result_status=Payment.RESULT_STATUS_SUCCESS File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/shortcuts.py", line 113, in get_object_or_404 return queryset.get(*args, **kwargs) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 351, in get num = len(clone) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 122, in __len__ self._fetch_all() File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 966, in _fetch_all self._result_cache = list(self.iterator()) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 264, in iterator requested=requested, only_load=only_load) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 1381, in get_klass_info requested=next, only_load=only_load) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 1381, in get_klass_info requested=next, only_load=only_load) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 1346, in get_klass_info klass = deferred_class_factory(klass, skip) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query_utils.py", line 209, in deferred_class_factory return type(str(name), (model,), overrides) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/modeltranslation/translator.py", line 265, in __new__ return super(translation_deferred_mcs, cls).__new__(cls, name, bases, attrs) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/base.py", line 285, in __new__ new_class._meta.apps.register_model(new_class._meta.app_label, new_class) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/apps/registry.py", line 213, in register_model (model_name, app_label, app_models[model_name], model)) RuntimeError: Conflicting 'event_deferred_description' models in application 'ticket': <class 'ticket.models.event.Event_Deferred_description'> and <class 'ticket.models.event.Event_Deferred_description'>. Request repr(): <WSGIRequest path:/cabinet/purchased/11534/tickets/, GET:<QueryDict: {u'get-ticket-img': [u'355007']}>, POST:<QueryDict: {}>, COOKIES:{'__utma': '227092.104923.141273.14368.14168.4', '__utmb': '2992.25.8.1412804', '__utmc': '2992', '__utmt': '1', '__utmz': '2292.1416.4.4.utmcsr=facebook.com|utmccn=(referral)|utmcmd=referral|utmcct=/', '_ym_visorc_215': 'w', 'csrf-token': '**************************', 'sessionid': '**************************'}, META:{'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', u'CSRF_COOKIE': u'**************************', 'DOCUMENT_ROOT': '/etc/nginx/html', 'HTTP_ACCEPT': 'image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8,uk;q=0.6', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': '__utmt=1; csrf-token=**************************; __utma=705992.4575923.1270073.1666368.1695768.4; __utmb=205992.25.8.1416942804; __utmc=227992; __utmz=22792.1416958.4.4.utmcsr=facebook.com|utmccn=(referral)|utmcmd=referral|utmcct=/; _ym_visorc_21635=w; sessionid=**************************', 'HTTP_HOST': '**************************', 'HTTP_REFERER': 'http://**************************/cabinet/purchased/11534/tickets/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36', 'PATH_INFO': u'/cabinet/purchased/11534/tickets/', 'QUERY_STRING': 'get-ticket-img=355007', 'REMOTE_ADDR': '**************************', 'REMOTE_PORT': '1237', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/cabinet/purchased/11534/tickets/?get-ticket-img=355007', u'SCRIPT_NAME': u'', 'SERVER_NAME': '**************************', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'uwsgi.core': 0, 'uwsgi.node': '**************************', 'uwsgi.version': '1.2.3-debian', 'wsgi.errors': <open file 'wsgi_errors', mode 'w' at 0x7fe75c6f34b0>, 'wsgi.file_wrapper': <built-in function uwsgi_sendfile>, 'wsgi.input': <uwsgi._Input object at 0x4db2370>, 'wsgi.multiprocess': True, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
comment:3 by , 10 years ago
Internal Server Error: /ajax/ Traceback (most recent call last): File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/tc/www/ticket/ticket/views/main.py", line 377, in ajax_eventsession event__is_active=True, event__is_deleted=False) File "/home/tc/www/ticket/utils/db.py", line 18, in get_object_or_None return queryset.get(*args, **kwargs) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 351, in get num = len(clone) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 122, in __len__ self._fetch_all() File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 966, in _fetch_all self._result_cache = list(self.iterator()) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 264, in iterator requested=requested, only_load=only_load) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 1381, in get_klass_info requested=next, only_load=only_load) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query.py", line 1346, in get_klass_info klass = deferred_class_factory(klass, skip) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/query_utils.py", line 209, in deferred_class_factory return type(str(name), (model,), overrides) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/modeltranslation/translator.py", line 265, in __new__ return super(translation_deferred_mcs, cls).__new__(cls, name, bases, attrs) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/db/models/base.py", line 285, in __new__ new_class._meta.apps.register_model(new_class._meta.app_label, new_class) File "/home/tc/.virtualenvs/ticket/local/lib/python2.7/site-packages/django/apps/registry.py", line 213, in register_model (model_name, app_label, app_models[model_name], model)) RuntimeError: Conflicting 'event_deferred_description_description_en_descriae804c3400b52ecb4181ed6574468538' models in application 'ticket': <class 'ticket.models.event.Event_Deferred_description_description_en_descriae804c3400b52ecb4181ed6574468538'> and <class 'ticket.models.event.Event_Deferred_description_description_en_descriae804c3400b52ecb4181ed6574468538'>. Request repr(): <WSGIRequest path:/ajax/, GET:<QueryDict: {}>, POST:<QueryDict: {u'action': [u'get_places_status'], u'csrfmiddlewaretoken': [u'**************'], u'id': [u'1787']}>, COOKIES:{'__utma': '2272.5227.14191.14191.14121.2', '__utmb': '22702.10.9.14570', '__utmc': '22792', '__utmz': '2272.141621.2.2.utmcsr=**********|utmccn=(referral)|utmcmd=referral|utmcct=/events', '_ym_visorc_215': 'w', 'csrf-token': '**************', 'sessionid': '**************'}, META:{'CONTENT_LENGTH': '85', 'CONTENT_TYPE': 'application/x-www-form-urlencoded; charset=UTF-8', u'CSRF_COOKIE': u'**************', 'DOCUMENT_ROOT': '/etc/nginx/html', 'HTTP_ACCEPT': '*/*', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, lzma', 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_CONTENT_LENGTH': '85', 'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded; charset=UTF-8', 'HTTP_COOKIE': 'csrf-token=**************; __utma=222.5267.14191.1491.14161.2; __utmb=227.10.9.1470; __utmc=22792; __utmz=227014121.2.2.utmcsr=************|utmccn=(referral)|utmcmd=referral|utmcct=/events; _ym_visorc_25=w; sessionid=**************', 'HTTP_HOST': '*********', 'HTTP_ORIGIN': 'http://*********', 'HTTP_REFERER': 'http://*********/eventsession/1787/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.65 Safari/537.36 OPR/26.0.1656.24 (Edition Yx)', 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest', 'PATH_INFO': u'/ajax/', 'QUERY_STRING': '', 'REMOTE_ADDR': '*********', 'REMOTE_PORT': '3758', 'REQUEST_METHOD': 'POST', 'REQUEST_URI': '/ajax/', u'SCRIPT_NAME': u'', 'SERVER_NAME': '*********', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'uwsgi.core': 1, 'uwsgi.node': '*********', 'uwsgi.version': '1.2.3-debian', 'wsgi.errors': <open file 'wsgi_errors', mode 'w' at 0x4158300>, 'wsgi.file_wrapper': <built-in function uwsgi_sendfile>, 'wsgi.input': <uwsgi._Input object at 0x7fbd680020b0>, 'wsgi.multiprocess': True, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
comment:4 by , 10 years ago
Resolution: | needsinfo |
---|---|
Status: | closed → new |
comment:5 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
It looks like this is a problem with the modeltranslation
package which does some sort of dynamic model generation. Django never officially supported that and now I think it's forbidden. Does that package claim compatibility with Django 1.7? I don't think this is a bug in Django, please see TicketClosingReasons/UseSupportChannels and reopen with further details if you believe otherwise.
Thanks for your report,
Unfortunately we can't help you further if you don't provide a full traceback of the exception.
Please re-open this ticket if you can provide one.