简体   繁体   中英

django.db.utils.OperationalError: near 񐁂򐁇N: syntax error

So I have a centos 6.6 on ec2. Installed python 2.7, virtualenv for 2.7, pip-2.7 and created a virtualenv install with my pip inside by virtualenv (2.7 all, promise) django 1.7.1

startproject works. I have my project. but: python manage.py runserver 0.0.0.0:8080 / python manage.py migrate and everything that use manage.py gets this error:

Performing system checks...

System check identified no issues (0 silenced).
Unhandled exception in thread started by <function wrapper at 0x1c43848>
Traceback (most recent call last):
  File "/opt/webapps/env/lib/python2.7/site-packages/django/utils/autoreload.py", line 222, in wrapper
    fn(*args, **kwargs)
....
  File "/opt/webapps/env/lib/python2.7/site-packages/django/db/backends/utils.py", line 63, in execute
    return self.cursor.execute(sql)
  File "/opt/webapps/env/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 483, in execute
    return Database.Cursor.execute(self, query)
django.db.utils.OperationalError: near "񐁂򐁇N": syntax error

I have no idea why this keeps happening. uninstalled & re-installed all but this error would stay anyway. Google keeps suggesting south install / vagrant but I don't use them now.

Someone know what this thing is about?

BTW: which python : /opt/webapps/env/bin/python

which pip : /opt/webapps/env/bin/pip

all in virtualenv in the right place and --version should 2.7

django.db.utils.OperationalError occures when validation of one of migrations failed. So, you should check all migrations of your project for incorrect SQL-syntax ("񐁂򐁇N").

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