D
D
DennyD3142018-05-03 14:16:53
Django
DennyD314, 2018-05-03 14:16:53

Why does an error occur when trying to deploy to dokku?

Hello!
I'm trying to deploy a site using dokku, when I run collectstatic --noinput I get a strange error.
The site is deployed on another server, also via dokku, everything is ok there.
If I turn off collectstatic, the same error appears on the next step -----> Running post-compile hook.
-----> $ python manage.py collectstatic --noinput
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/app/.heroku/python/ lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/app/.heroku/python /lib/python2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/app/.heroku/python/lib/python2.7/site-packages /django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/app/.heroku/python/lib/python2.7/site-packages/django/apps/config.py ", line 87, in create
module = import_module(entry)
File "/app/.heroku/python/lib/python2.7/importlib/__init__.py", line 37,in import_module
__import__(name)
File "/app/.heroku/python/lib/python2.7/site-packages/autocomplete_light/__init__.py", line 7, in
from .shortcuts import * # noqa
File "/app/.heroku/python/lib/ python2.7/site-packages/autocomplete_light/shortcuts.py", line 7, in
from .forms import *
File "/app/.heroku/python/lib/python2.7/site-packages/autocomplete_light/forms.py" , line 443, in
GenericM2MRelatedObjectDescriptorHandlingMixin, forms.ModelForm)):
File "/app/.heroku/python/lib/python2.7/site-packages/autocomplete_light/forms.py", line 282, in __new__
attrs)
File "/ app/.heroku/python/lib/python2.7/site-packages/django/forms/models.py", line 245, in __new__
new_class = super(ModelFormMetaclass, mcs).__new__(mcs, name, bases, attrs)
File "/app/.heroku/python/lib/python2.7/site-packages/django/forms/forms.py", line 85 , in __new__
.__new__(mcs, name, bases, attrs))
File "/app/.heroku/python/lib/python2.7/site-packages/django/forms/widgets.py", line 143, in __new__
. __new__(mcs, name, bases, attrs))
TypeError: Error when calling the metaclass bases
metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
! Error while running '$ python manage.py collectstatic --noinput'.
See traceback above for details.
You may need to update application code to resolve this error.
Or, you can disable collectstatic for this application:
$ heroku config:set DISABLE_COLLECTSTATIC=1
https://devcenter.heroku.com/articles/django-assets

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Bragin, 2018-05-03
@DennyD314

The problem here is not static.
Updating the django-autocomplete-light package should help you.
See more here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question