django.db.utils。OperationalError:附近????????N:语法错误

时间:2022-02-20 23:10:59

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

所以我在ec2上有一个centos 6.6。安装了python 2.7, virtualenv 2.7, pip-2.7,并创建了一个virtualenv安装,由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:

startproject作品。我有我的项目。但是:python管理。py runserver 0.0.0.0:8080 / python管理。py迁移和所有使用管理的东西。py得到这个错误:

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

顺便说一句:python:/ opt / webapps / env / bin / python

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

皮普:/ opt / webapps / env / bin /脉冲

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

所有在virtualenv中的正确位置和-版本应该是2.7。

1 个解决方案

#1


0  

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").

django.db.utils。当一个迁移的验证失败时,操作错误发生。So,您应该检查所有迁移的项目不正确的sql语法("????????N").

#1


0  

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").

django.db.utils。当一个迁移的验证失败时,操作错误发生。So,您应该检查所有迁移的项目不正确的sql语法("????????N").