guys i puled my project from github and i installed all required packages but after makemigrations
or runserver
commands i get error like below.
tying to comment ‘social_auth
‘ and social_django
… and
command like python3 manage.py migrate --fake myprojectname zero
or
python3 manage.py migrate --fake social_auth zero
or reinstalling packages dont work for me any idea???
error :
.....
......
db.query(q)
File "/home/mohammadreza/www/html/academy/uenv/lib/python3.6/site-packages/MySQLdb/connections.py", line 277, in query
_mysql.connection.query(self, query)
django.db.utils.ProgrammingError: (1146, "Table 'academy.auth_group' doesn't exist")
this is installed app
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
'rest_framework',
'rest_framework_jwt',
'rest_framework.authtoken',
'social_django',
'rest_social_auth',
'api.v1.blog',
'api.v1.store',
'api.v1.accounts',
'api.v1.manager',
]
requirment file:
amqp==2.2.2
appdirs==1.4.3
asn1crypto==0.24.0
billiard==3.5.0.3
cached-property==1.3.1
celery==4.1.0
certifi==2018.1.18
cffi==1.11.5
chardet==3.0.4
cryptography==2.1.4
cycler==0.10.0
defusedxml==0.5.0
Django==2.0.4
django-braces==1.12.0
django-cors-headers==2.1.0
django-filter==1.1.0
django-ranged-response==0.2.0
django-redis==4.9.0
djangorestframework==3.7.7
djangorestframework-jwt==1.11.0
gevent==1.2.2
greenlet==0.4.13
gunicorn==19.7.1
idna==2.6
isodate==0.6.0
kiwisolver==1.0.1
kombu==4.1.0
lxml==4.1.1
Markdown==2.6.11
matplotlib==2.2.2
mysqlclient==1.3.12
numpy==1.14.2
oauthlib==2.0.7
olefile==0.45.1
opencv-python==3.4.0.12
Pillow==4.1.1
pycparser==2.18
PyJWT==1.5.3
pyparsing==2.2.0
pytesseract==0.2.0
python-dateutil==2.7.2
python-memcached==1.59
python3-openid==3.1.0
pytz==2017.3
redis==2.10.6
requests==2.18.4
requests-oauthlib==0.8.0
requests-toolbelt==0.8.0
rest-social-auth==1.2.0
six==1.11.0
social-auth-app-django==1.2.0
social-auth-core==1.7.0
urllib3==1.22
vine==1.1.4
whitenoise==3.3.1
zeep==2.5.0
2
Answers
What worked for me is, on an empty database after deleting files from migrations folder except init.py:
u need to paste all error log for analysis as below.
i found we cannot use some object as [__users_in_group = Group.objects.get(name=__app_group_name).user_set.all()] out the function. And fixed this error after move this source to function.