ASKBOT / askbot-devel

Askbot is a Django/Python Q&A forum. **Contributors README**: https://github.com/ASKBOT/askbot-devel#how-to-contribute. Commercial hosting of Askbot and support are available at https://askbot.com
Other
1.56k stars 628 forks source link

TypeError: Error when calling the metaclass bases #735

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello, trying to install Askbot via

pip install askbot psycopg2
askbot-setup

But when I try to run any command like

python manage.py collectstatic
python manage.py syncdb
python manage.py makemigrations
python manage.py migrate askbot
python manage.py migrate django_authopenid

I receive an

Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 354, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 328, in execute django.setup() File "/usr/local/lib/python2.7/dist-packages/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 198, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "/usr/local/lib/python2.7/dist-packages/askbot/models/init.py", line 2, in startup_procedures.run() File "/usr/local/lib/python2.7/dist-packages/askbot/startup_procedures.py", line 1086, in run run_startup_tests() File "/usr/local/lib/python2.7/dist-packages/askbot/startup_procedures.py", line 1012, in run_startup_tests test_modules() File "/usr/local/lib/python2.7/dist-packages/askbot/startup_procedures.py", line 289, in test_modules try_import(mod_name, pip_path) File "/usr/local/lib/python2.7/dist-packages/askbot/startup_procedures.py", line 209, in try_import load_module(module_name) File "/usr/local/lib/python2.7/dist-packages/askbot/utils/loading.py", line 23, in load_module return import(mod_path, globals(), locals(), [], -1) File "/usr/local/lib/python2.7/dist-packages/picklefield/init.py", line 5, in from picklefield.fields import PickledObjectField # reexport File "/usr/local/lib/python2.7/dist-packages/picklefield/fields.py", line 79, in class PickledObjectField(_get_subfield_superclass()): File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/subclassing.py", line 24, in new new_class = super(SubfieldBase, cls).new(cls, 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

Is there anything missing?

evgenyfadeev commented 7 years ago

This should be fixed by the commit a7c1fbc711c737d5bbc6b80170af63c83ad40d4b where version of the six library is pinned

sebastian-philipp commented 5 years ago

Found it: As pip now pulls in six 0.11 (at least on my distribution), this fix no longer works

Lauren15468 commented 5 years ago

I am getting the same error and pip now pulls six 1.12.0.

sebastian-philipp commented 5 years ago

yeah, that's been fixed in the 0.11.x branch

Lauren15468 commented 5 years ago

How do I ensure it works? I do pip install six==1.11.0 ?

sebastian-philipp commented 5 years ago

that's Askbot's 0.11.x branch

Lauren15468 commented 5 years ago

@sebastian-philipp oh ok. I am following these instructions https://computingforgeeks.com/setup-askbot-ubuntu-18-04-with-nginx-and-letsencrypt-ssl/ how do I ensure I am using Askbot's 0.11.x branch?

Lauren15468 commented 5 years ago

now what I do is: git clone git://github.com/ASKBOT/askbot-devel.git git checkout 0.11.x sudo python3 setup.py develop

which both work but then I do: askbot-setup and I get

Traceback (most recent call last): File "/srv/askbot_2/venv/bin/askbot-setup", line 6, in from pkg_resources import load_entry_point File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 3250, in @_call_aside File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 3234, in _call_aside f(*args, **kwargs) File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 3263, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 583, in _build_master ws.require(requires) File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/srv/askbot_2/venv/local/lib/python2.7/site-packages/pkg_resources/init.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'responses>=0.9.0' distribution was not found and is required by askbot

I would get a similar error with python setup.py develop as well.

Any suggestions to fix this would be greatly appreciated.

sebastian-philipp commented 5 years ago

can you create a new issue for this?

Lauren15468 commented 5 years ago

created a new issue for this https://github.com/ASKBOT/askbot-devel/issues/839

setoelkahfi commented 5 years ago

This is the fix:

pip install six==1.10.0

You're welcome!