简体   繁体   中英

Django Runtime Error while trying to run server

I am trying to run my Django server via 'python manage.py runserver' on a github repository i cloned and always get this runtime error message:

class AbstractBaseUser(models.Model):

RuntimeError: ____class____ not set defining 'AbstractBaseUser' as <'class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was ____classcell____ propagated to type.____new____?

Details of installed packages in my virtual environment are: Django 1.9 | django-crispy-forms 1.6.0 | django-markdown-deux 1.0.5 | django-pagedown 0.1.1 | markdown2 2.3.1 | olefile 0.46 | Pillow 7.1.1 | pip 19.2.3 | setuptools 41.2.0 |

I am using python version 3.8.1

please does anyone have any suggestions on how to solve this error. Thank you.

First of all, you should try to update your packages to the latest versions, as you are using python 3.8. Check this also: https://docs.djangoproject.com/en/3.0/faq/install/#what-python-version-can-i-use-with-django I don't think Django 1.9 is compatible with python 3.8

RuntimeError at /save You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to 127.0.0.1:8000/save/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM