(1139, "Got error 'empty (sub)expression' from regexp")
Request Method: | GET |
---|---|
Request URL: | http://www.itdp-china.org/search/?key=%25E5%25A4%25A9%25E6%25B4%25A5&lang=0 |
Django Version: | 1.11.11 |
Exception Type: | InternalError |
Exception Value: | (1139, "Got error 'empty (sub)expression' from regexp") |
Exception Location: | C:\Python34\lib\site-packages\pymysql\err.py in _check_mysql_exception, line 115 |
Python Executable: | C:\Apache24\bin\httpd.exe |
Python Version: | 3.4.4 |
Python Path: | ['C:/itdpchina', 'C:\\Python34\\lib\\site-packages\\flup-1.0.3.dev20151210-py3.4.egg', 'C:\\Python34\\lib\\site-packages\\aliyun_python_sdk_core_v3-2.13.11-py3.4.egg', 'C:\\Python34\\lib\\site-packages\\aliyun_python_sdk_kms-2.10.0-py3.4.egg', 'C:\\windows\\system32\\python34.zip', 'C:\\Python34\\Lib', 'C:\\Python34\\DLLs', 'C:\\Apache24', 'C:\\Apache24\\bin', 'C:\\Python34', 'C:\\Python34\\lib\\site-packages', 'C:\\Python34\\lib\\site-packages\\win32', 'C:\\Python34\\lib\\site-packages\\win32\\lib', 'C:\\Python34\\lib\\site-packages\\Pythonwin'] |
Server time: | 星期五, 29 三月 2024 10:26:59 +0800 |
C:\Python34\lib\site-packages\django\db\backends\utils.py
in execute
def execute(self, sql, params=None):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
if params is None:
return self.cursor.execute(sql)
else:
return self.cursor.execute(sql, params)...
def executemany(self, sql, param_list):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
return self.cursor.executemany(sql, param_list)
Variable | Value |
---|---|
params | ('',) |
self | <django.db.backends.utils.CursorDebugWrapper object at 0x000000005B2C2828> |
sql | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' '`photo_city` WHERE `photo_city`.`CityCn` REGEXP %s ORDER BY ' '`photo_city`.`City` ASC') |
C:\Python34\lib\site-packages\django\db\backends\mysql\base.py
in execute
def __init__(self, cursor):
self.cursor = cursor
def execute(self, query, args=None):
try:
# args is None means no string interpolation
return self.cursor.execute(query, args)...
except Database.OperationalError as e:
# Map some error codes to IntegrityError, since they seem to be
# misclassified and Django would prefer the more logical place.
if e.args[0] in self.codes_for_integrityerror:
six.reraise(utils.IntegrityError, utils.IntegrityError(*tuple(e.args)), sys.exc_info()[2])
raise
Variable | Value |
---|---|
args | ('',) |
query | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' '`photo_city` WHERE `photo_city`.`CityCn` REGEXP %s ORDER BY ' '`photo_city`.`City` ASC') |
self | <django.db.backends.mysql.base.CursorWrapper object at 0x000000005B2C2EF0> |
C:\Python34\lib\site-packages\pymysql\cursors.py
in execute
If args is a dict, %(name)s can be used as a placeholder in the query.
"""
while self.nextset():
pass
query = self.mogrify(query, args)
result = self._query(query)...
self._executed = query
return result
def executemany(self, query, args):
# type: (str, list) -> int
"""Run several data against one query
Variable | Value |
---|---|
args | ('',) |
query | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' "`photo_city` WHERE `photo_city`.`CityCn` REGEXP '' ORDER BY " '`photo_city`.`City` ASC') |
self | <pymysql.cursors.Cursor object at 0x00000000569A0D30> |
C:\Python34\lib\site-packages\pymysql\cursors.py
in _query
if not (0 <= r < len(self._rows)):
raise IndexError("out of range")
self.rownumber = r
def _query(self, q):
conn = self._get_db()
self._last_executed = q
conn.query(q)...
self._do_get_result()
return self.rowcount
def _do_get_result(self):
conn = self._get_db()
Variable | Value |
---|---|
conn | <pymysql.connections.Connection object at 0x00000000569A0828> |
q | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' "`photo_city` WHERE `photo_city`.`CityCn` REGEXP '' ORDER BY " '`photo_city`.`City` ASC') |
self | <pymysql.cursors.Cursor object at 0x00000000569A0D30> |
C:\Python34\lib\site-packages\pymysql\connections.py
in query
# print("DEBUG: sending query:", sql)
if isinstance(sql, text_type) and not (JYTHON or IRONPYTHON):
if PY2:
sql = sql.encode(self.encoding)
else:
sql = sql.encode(self.encoding, 'surrogateescape')
self._execute_command(COMMAND.COM_QUERY, sql)
self._affected_rows = self._read_query_result(unbuffered=unbuffered)...
return self._affected_rows
def next_result(self, unbuffered=False):
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
return self._affected_rows
Variable | Value |
---|---|
self | <pymysql.connections.Connection object at 0x00000000569A0828> |
sql | b"SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, `photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM `photo_city` WHERE `photo_city`.`CityCn` REGEXP '' ORDER BY `photo_city`.`City` ASC" |
unbuffered | False |
C:\Python34\lib\site-packages\pymysql\connections.py
in _read_query_result
result.init_unbuffered_query()
except:
result.unbuffered_active = False
result.connection = None
raise
else:
result = MySQLResult(self)
result.read()...
self._result = result
if result.server_status is not None:
self.server_status = result.server_status
return result.affected_rows
def insert_id(self):
Variable | Value |
---|---|
result | <pymysql.connections.MySQLResult object at 0x000000005B2C2A20> |
self | <pymysql.connections.Connection object at 0x00000000569A0828> |
unbuffered | False |
C:\Python34\lib\site-packages\pymysql\connections.py
in read
def __del__(self):
if self.unbuffered_active:
self._finish_unbuffered_query()
def read(self):
try:
first_packet = self.connection._read_packet()...
if first_packet.is_ok_packet():
self._read_ok_packet(first_packet)
elif first_packet.is_load_local_packet():
self._read_load_local_packet(first_packet)
else:
Variable | Value |
---|---|
self | <pymysql.connections.MySQLResult object at 0x000000005B2C2A20> |
C:\Python34\lib\site-packages\pymysql\connections.py
in _read_packet
# https://dev.mysql.com/doc/internals/en/sending-more-than-16mbyte.html
if bytes_to_read == 0xffffff:
continue
if bytes_to_read < MAX_PACKET_LEN:
break
packet = packet_type(buff, self.encoding)
packet.check_error()...
return packet
def _read_bytes(self, num_bytes):
self._sock.settimeout(self._read_timeout)
while True:
try:
Variable | Value |
---|---|
btrh | 0 |
btrl | 54 |
buff | b"\xffs\x04#42000Got error 'empty (sub)expression' from regexp" |
bytes_to_read | 54 |
packet | <pymysql.connections.MysqlPacket object at 0x000000005B2C22B0> |
packet_header | b'6\x00\x00\x01' |
packet_number | 1 |
packet_type | <class 'pymysql.connections.MysqlPacket'> |
recv_data | b"\xffs\x04#42000Got error 'empty (sub)expression' from regexp" |
self | <pymysql.connections.Connection object at 0x00000000569A0828> |
C:\Python34\lib\site-packages\pymysql\connections.py
in check_error
def check_error(self):
if self.is_error_packet():
self.rewind()
self.advance(1) # field_count == error (we already know that)
errno = self.read_uint16()
if DEBUG: print("errno =", errno)
err.raise_mysql_exception(self._data)...
def dump(self):
dump_packet(self._data)
class FieldDescriptorPacket(MysqlPacket):
Variable | Value |
---|---|
errno | 1139 |
self | <pymysql.connections.MysqlPacket object at 0x000000005B2C22B0> |
C:\Python34\lib\site-packages\pymysql\err.py
in raise_mysql_exception
# couldn't find the right error number
raise InternalError(errno, errorvalue)
def raise_mysql_exception(data):
errinfo = _get_error_info(data)
_check_mysql_exception(errinfo)...
Variable | Value |
---|---|
data | b"\xffs\x04#42000Got error 'empty (sub)expression' from regexp" |
errinfo | (1139, '42000', "Got error 'empty (sub)expression' from regexp") |
C:\Python34\lib\site-packages\pymysql\err.py
in _check_mysql_exception
def _check_mysql_exception(errinfo):
errno, sqlstate, errorvalue = errinfo
errorclass = error_map.get(errno, None)
if errorclass:
raise errorclass(errno, errorvalue)
# couldn't find the right error number
raise InternalError(errno, errorvalue)...
def raise_mysql_exception(data):
errinfo = _get_error_info(data)
_check_mysql_exception(errinfo)
Variable | Value |
---|---|
errinfo | (1139, '42000', "Got error 'empty (sub)expression' from regexp") |
errno | 1139 |
errorclass | None |
errorvalue | "Got error 'empty (sub)expression' from regexp" |
sqlstate | '42000' |
C:\Python34\lib\site-packages\django\core\handlers\exception.py
in inner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@wraps(get_response, assigned=available_attrs(get_response))
def inner(request):
try:
response = get_response(request)...
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | InternalError(1139, "Got error 'empty (sub)expression' from regexp") |
get_response | <bound method WSGIHandler._legacy_get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x00000000041B29E8>> |
request | <WSGIRequest: GET '/search/?key=%25E5%25A4%25A9%25E6%25B4%25A5&lang=0'> |
C:\Python34\lib\site-packages\django\core\handlers\base.py
in _legacy_get_response
# Apply request middleware
for middleware_method in self._request_middleware:
response = middleware_method(request)
if response:
break
if response is None:
response = self._get_response(request)...
return response
Variable | Value |
---|---|
middleware_method | <bound method MessageMiddleware.process_request of <django.contrib.messages.middleware.MessageMiddleware object at 0x00000000046CB1D0>> |
request | <WSGIRequest: GET '/search/?key=%25E5%25A4%25A9%25E6%25B4%25A5&lang=0'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x00000000041B29E8> |
C:\Python34\lib\site-packages\django\core\handlers\base.py
in _get_response
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
except Exception as e:
response = self.process_exception_by_middleware(e, request)...
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
view_name = callback.__name__
else: # CBV
Variable | Value |
---|---|
callback | <function searchShow at 0x000000000630D7B8> |
callback_args | () |
callback_kwargs | {} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x00000000046B3D68>> |
request | <WSGIRequest: GET '/search/?key=%25E5%25A4%25A9%25E6%25B4%25A5&lang=0'> |
resolver | <RegexURLResolver 'itdpchina.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=itdpweb.views.searchShow, args=(), kwargs={}, url_name=search, app_names=[], namespaces=[]) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x00000000041B29E8> |
wrapped_callback | <function searchShow at 0x000000000630D7B8> |
C:\Python34\lib\site-packages\django\core\handlers\base.py
in _get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)...
except Exception as e:
response = self.process_exception_by_middleware(e, request)
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
Variable | Value |
---|---|
callback | <function searchShow at 0x000000000630D7B8> |
callback_args | () |
callback_kwargs | {} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x00000000046B3D68>> |
request | <WSGIRequest: GET '/search/?key=%25E5%25A4%25A9%25E6%25B4%25A5&lang=0'> |
resolver | <RegexURLResolver 'itdpchina.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=itdpweb.views.searchShow, args=(), kwargs={}, url_name=search, app_names=[], namespaces=[]) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x00000000041B29E8> |
wrapped_callback | <function searchShow at 0x000000000630D7B8> |
C:\Python34\lib\site-packages\django\utils\decorators.py
in _wrapped_view
if result is not None:
return result
if hasattr(middleware, 'process_view'):
result = middleware.process_view(request, view_func, args, kwargs)
if result is not None:
return result
try:
response = view_func(request, *args, **kwargs)...
except Exception as e:
if hasattr(middleware, 'process_exception'):
result = middleware.process_exception(request, e)
if result is not None:
return result
raise
Variable | Value |
---|---|
args | () |
kwargs | {} |
middleware | <django.middleware.cache.CacheMiddleware object at 0x0000000006308E48> |
request | <WSGIRequest: GET '/search/?key=%25E5%25A4%25A9%25E6%25B4%25A5&lang=0'> |
result | None |
view_func | <function searchShow at 0x0000000005ED3AE8> |
C:/itdpchina\itdpweb\views.py
in searchShow
segs = list(jieba.cut(tem_key, cut_all=True))
if type_id == 'article': # search article
for seg in segs:
result_article.extend(itdpweb.models.Itdpnews.objects.filter(chtitle__iregex=seg).exclude(classify='video'))
new_list_all = list(set(result_article))
paginator, new_list = getPage(request, new_list_all, 9)
return render(request, 'itdpweb/chnews/chnewslist.html', locals())
[search_cities.append(all_city.filter(citycn__iregex=seg).first()) for seg in segs if all_city.filter(citycn__iregex=seg)]...
[search_maintopics.append(all_maintopic.filter(maintopiccn__iregex=seg).first()) for seg in segs if all_maintopic.filter(maintopiccn__iregex=seg)]
[search_topics.append(all_topic.filter(topiccn__iregex=seg).first()) for seg in segs if all_topic.filter(topiccn__iregex=seg)]
if not search_cities and not search_maintopics and not search_topics:
return render(request, "ch_search.html", locals())
result_pics = search_photo(search_cities, search_maintopics, search_topics)
paginator, result_pics = getPage(request, result_pics, 60)
Variable | Value |
---|---|
all_city | <QuerySet [<PhotoCity: 涩谷区 / None>, <PhotoCity: Darsmand / None>, <PhotoCity: 普罗维登西亚 / None>, <PhotoCity: 三鹰 / None>, <PhotoCity: 贵州毕节 / >, <PhotoCity: 阿布扎比 / Abu Dhabi>, <PhotoCity: 亚的斯亚贝巴 / Addis Ababa>, <PhotoCity: 艾哈迈达巴德 / Ahmedabad>, <PhotoCity: 阿拉木图 / Almaty>, <PhotoCity: 阿姆斯特丹 / Amsterdam>, <PhotoCity: 安特卫普 / Antwerp>, <PhotoCity: 曼谷 / Bangkok>, <PhotoCity: 巴塞罗那 / Barcelona>, <PhotoCity: 北京 / Beijing>, <PhotoCity: 贝尔格莱德 / Belgrade>, <PhotoCity: 贝洛奥里藏特 / Belo Horizonte>, <PhotoCity: 柏林 / Berlin>, <PhotoCity: 波哥大 / Bogota>, <PhotoCity: 波士顿 / Boston>, <PhotoCity: 布里斯班 / Brisbane>, '...(remaining elements truncated)...']> |
all_maintopic | <QuerySet [<Maintopic: 地铁, 轨道, 轻铁>, <Maintopic: 公交车站>, <Maintopic: 公交车>, <Maintopic: 总站和保养场>, <Maintopic: 非常规交通>, <Maintopic: 车辆和交通>, <Maintopic: BRT车站>, <Maintopic: 公交车专用车道>, <Maintopic: 不当行为>, <Maintopic: ITS和机电>, <Maintopic: BRT元素>, <Maintopic: 行人连廊>, <Maintopic: 行人道>, <Maintopic: 公共空间元素>, <Maintopic: 河道>, <Maintopic: 交通流通>, <Maintopic: 货运>, <Maintopic: 街头活动>, <Maintopic: 建筑物及建筑>, <Maintopic: 道路和街道和巷道>, '...(remaining elements truncated)...']> |
all_topic | <QuerySet [<Topic: 路中公交车站>, <Topic: 公交站处车辆排队>, <Topic: 向外扩出的公交车站>, <Topic: 站内ITS>, <Topic: 公交站(常规)>, <Topic: 拥挤的公交车站>, <Topic: “卡塞尔”(斜面/弧面)侧石>, <Topic: 站内信息>, <Topic: 公交车上下客>, <Topic: 校巴>, <Topic: 公交车辆内部>, <Topic: 中小巴>, <Topic: 公交车内过度拥挤>, <Topic: 电车>, <Topic: 车辆>, <Topic: 铰接式公交车>, <Topic: 行驶的公交车>, <Topic: 车内信息和ITS>, <Topic: 公交保养场>, <Topic: 公交总站>, '...(remaining elements truncated)...']> |
key | '%E5%A4%A9%E6%B4%A5' |
lang | '0' |
oss_thumbnail_style | '?x-oss-process=style/thumbnail' |
oss_thumbnail_url | 'https://itdpphotolib.oss-ap-southeast-1.aliyuncs.com/thumbnail/' |
path | '/search/?key=%25E5%25A4%25A9%25E6%25B4%25A5&lang=0' |
request | <WSGIRequest: GET '/search/?key=%25E5%25A4%25A9%25E6%25B4%25A5&lang=0'> |
result_article | [] |
search_cities | [] |
search_maintopics | [] |
search_topics | [] |
segs | ['', 'E5', 'A4', 'A9', 'E6', 'B4', 'A5'] |
tem_key | '%E5%A4%A9%E6%B4%A5' |
type_id | 'photo' |
C:/itdpchina\itdpweb\views.py
in <listcomp>
segs = list(jieba.cut(tem_key, cut_all=True))
if type_id == 'article': # search article
for seg in segs:
result_article.extend(itdpweb.models.Itdpnews.objects.filter(chtitle__iregex=seg).exclude(classify='video'))
new_list_all = list(set(result_article))
paginator, new_list = getPage(request, new_list_all, 9)
return render(request, 'itdpweb/chnews/chnewslist.html', locals())
[search_cities.append(all_city.filter(citycn__iregex=seg).first()) for seg in segs if all_city.filter(citycn__iregex=seg)]...
[search_maintopics.append(all_maintopic.filter(maintopiccn__iregex=seg).first()) for seg in segs if all_maintopic.filter(maintopiccn__iregex=seg)]
[search_topics.append(all_topic.filter(topiccn__iregex=seg).first()) for seg in segs if all_topic.filter(topiccn__iregex=seg)]
if not search_cities and not search_maintopics and not search_topics:
return render(request, "ch_search.html", locals())
result_pics = search_photo(search_cities, search_maintopics, search_topics)
paginator, result_pics = getPage(request, result_pics, 60)
Variable | Value |
---|---|
.0 | <list_iterator object at 0x00000000569A06D8> |
all_city | <QuerySet [<PhotoCity: 涩谷区 / None>, <PhotoCity: Darsmand / None>, <PhotoCity: 普罗维登西亚 / None>, <PhotoCity: 三鹰 / None>, <PhotoCity: 贵州毕节 / >, <PhotoCity: 阿布扎比 / Abu Dhabi>, <PhotoCity: 亚的斯亚贝巴 / Addis Ababa>, <PhotoCity: 艾哈迈达巴德 / Ahmedabad>, <PhotoCity: 阿拉木图 / Almaty>, <PhotoCity: 阿姆斯特丹 / Amsterdam>, <PhotoCity: 安特卫普 / Antwerp>, <PhotoCity: 曼谷 / Bangkok>, <PhotoCity: 巴塞罗那 / Barcelona>, <PhotoCity: 北京 / Beijing>, <PhotoCity: 贝尔格莱德 / Belgrade>, <PhotoCity: 贝洛奥里藏特 / Belo Horizonte>, <PhotoCity: 柏林 / Berlin>, <PhotoCity: 波哥大 / Bogota>, <PhotoCity: 波士顿 / Boston>, <PhotoCity: 布里斯班 / Brisbane>, '...(remaining elements truncated)...']> |
search_cities | [] |
seg | '' |
C:\Python34\lib\site-packages\django\db\models\query.py
in __bool__
3. self.iterator()
- Responsible for turning the rows into model objects.
"""
self._fetch_all()
return iter(self._result_cache)
def __bool__(self):
self._fetch_all()...
return bool(self._result_cache)
def __nonzero__(self): # Python 2 compatibility
return type(self).__bool__(self)
def __getitem__(self, k):
Variable | Value |
---|---|
self | Error in formatting: InternalError: (1139, "Got error 'empty (sub)expression' from regexp") |
C:\Python34\lib\site-packages\django\db\models\query.py
in _fetch_all
clone._fields = self._fields
clone.__dict__.update(kwargs)
return clone
def _fetch_all(self):
if self._result_cache is None:
self._result_cache = list(self._iterable_class(self))...
if self._prefetch_related_lookups and not self._prefetch_done:
self._prefetch_related_objects()
def _next_is_sticky(self):
"""
Indicates that the next filter call and the one following that should
Variable | Value |
---|---|
self | Error in formatting: InternalError: (1139, "Got error 'empty (sub)expression' from regexp") |
C:\Python34\lib\site-packages\django\db\models\query.py
in __iter__
def __iter__(self):
queryset = self.queryset
db = queryset.db
compiler = queryset.query.get_compiler(using=db)
# Execute the query. This will also fill compiler.select, klass_info,
# and annotations.
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)...
select, klass_info, annotation_col_map = (compiler.select, compiler.klass_info,
compiler.annotation_col_map)
model_cls = klass_info['model']
select_fields = klass_info['select_fields']
model_fields_start, model_fields_end = select_fields[0], select_fields[-1] + 1
init_list = [f[0].target.attname
Variable | Value |
---|---|
compiler | <django.db.backends.mysql.compiler.SQLCompiler object at 0x000000005B2C2048> |
db | 'default' |
queryset | Error in formatting: InternalError: (1139, "Got error 'empty (sub)expression' from regexp") |
self | <django.db.models.query.ModelIterable object at 0x000000005B2C23C8> |
C:\Python34\lib\site-packages\django\db\models\sql\compiler.py
in execute_sql
# Might fail for server-side cursors (e.g. connection closed)
cursor.close()
except Exception:
# Ignore clean up errors and raise the original error instead.
# Python 2 doesn't chain exceptions. Remove this error
# silencing when dropping Python 2 compatibility.
pass
raise original_exception...
if result_type == CURSOR:
# Caller didn't specify a result_type, so just give them back the
# cursor to process (and close).
return cursor
if result_type == SINGLE:
Variable | Value |
---|---|
chunked_fetch | False |
cursor | <django.db.backends.utils.CursorDebugWrapper object at 0x000000005B2C2828> |
params | ('',) |
result_type | 'multi' |
self | <django.db.backends.mysql.compiler.SQLCompiler object at 0x000000005B2C2048> |
sql | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' '`photo_city` WHERE `photo_city`.`CityCn` REGEXP %s ORDER BY ' '`photo_city`.`City` ASC') |
C:\Python34\lib\site-packages\django\db\models\sql\compiler.py
in execute_sql
else:
return
if chunked_fetch:
cursor = self.connection.chunked_cursor()
else:
cursor = self.connection.cursor()
try:
cursor.execute(sql, params)...
except Exception as original_exception:
try:
# Might fail for server-side cursors (e.g. connection closed)
cursor.close()
except Exception:
# Ignore clean up errors and raise the original error instead.
Variable | Value |
---|---|
chunked_fetch | False |
cursor | <django.db.backends.utils.CursorDebugWrapper object at 0x000000005B2C2828> |
params | ('',) |
result_type | 'multi' |
self | <django.db.backends.mysql.compiler.SQLCompiler object at 0x000000005B2C2048> |
sql | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' '`photo_city` WHERE `photo_city`.`CityCn` REGEXP %s ORDER BY ' '`photo_city`.`City` ASC') |
C:\Python34\lib\site-packages\django\db\backends\utils.py
in execute
class CursorDebugWrapper(CursorWrapper):
# XXX callproc isn't instrumented at this time.
def execute(self, sql, params=None):
start = time()
try:
return super(CursorDebugWrapper, self).execute(sql, params)...
finally:
stop = time()
duration = stop - start
sql = self.db.ops.last_executed_query(self.cursor, sql, params)
self.db.queries_log.append({
'sql': sql,
Variable | Value |
---|---|
__class__ | <class 'django.db.backends.utils.CursorDebugWrapper'> |
duration | 0.0009751319885253906 |
params | ('',) |
self | <django.db.backends.utils.CursorDebugWrapper object at 0x000000005B2C2828> |
sql | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' "`photo_city` WHERE `photo_city`.`CityCn` REGEXP '' ORDER BY " '`photo_city`.`City` ASC') |
start | 1711679219.349196 |
stop | 1711679219.350171 |
C:\Python34\lib\site-packages\django\db\backends\utils.py
in execute
def execute(self, sql, params=None):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
if params is None:
return self.cursor.execute(sql)
else:
return self.cursor.execute(sql, params)...
def executemany(self, sql, param_list):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
return self.cursor.executemany(sql, param_list)
Variable | Value |
---|---|
params | ('',) |
self | <django.db.backends.utils.CursorDebugWrapper object at 0x000000005B2C2828> |
sql | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' '`photo_city` WHERE `photo_city`.`CityCn` REGEXP %s ORDER BY ' '`photo_city`.`City` ASC') |
C:\Python34\lib\site-packages\django\db\utils.py
in __exit__
dj_exc_value.__cause__ = exc_value
if not hasattr(exc_value, '__traceback__'):
exc_value.__traceback__ = traceback
# Only set the 'errors_occurred' flag for errors that may make
# the connection unusable.
if dj_exc_type not in (DataError, IntegrityError):
self.wrapper.errors_occurred = True
six.reraise(dj_exc_type, dj_exc_value, traceback)...
def __call__(self, func):
# Note that we are intentionally not using @wraps here for performance
# reasons. Refs #21109.
def inner(*args, **kwargs):
with self:
Variable | Value |
---|---|
db_exc_type | <class 'pymysql.err.InternalError'> |
dj_exc_type | <class 'django.db.utils.InternalError'> |
dj_exc_value | InternalError(1139, "Got error 'empty (sub)expression' from regexp") |
exc_type | <class 'pymysql.err.InternalError'> |
exc_value | InternalError(1139, "Got error 'empty (sub)expression' from regexp") |
self | <django.db.utils.DatabaseErrorWrapper object at 0x000000000991F5F8> |
traceback | <traceback object at 0x00000000569CF408> |
C:\Python34\lib\site-packages\django\utils\six.py
in reraise
if PY3:
exec_ = getattr(moves.builtins, "exec")
def reraise(tp, value, tb=None):
if value is None:
value = tp()
if value.__traceback__ is not tb:
raise value.with_traceback(tb)...
raise value
else:
def exec_(_code_, _globs_=None, _locs_=None):
"""Execute code in a namespace."""
if _globs_ is None:
Variable | Value |
---|---|
tb | <traceback object at 0x00000000569CF408> |
tp | <class 'django.db.utils.InternalError'> |
value | InternalError(1139, "Got error 'empty (sub)expression' from regexp") |
C:\Python34\lib\site-packages\django\db\backends\utils.py
in execute
def execute(self, sql, params=None):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
if params is None:
return self.cursor.execute(sql)
else:
return self.cursor.execute(sql, params)...
def executemany(self, sql, param_list):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
return self.cursor.executemany(sql, param_list)
Variable | Value |
---|---|
params | ('',) |
self | <django.db.backends.utils.CursorDebugWrapper object at 0x000000005B2C2828> |
sql | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' '`photo_city` WHERE `photo_city`.`CityCn` REGEXP %s ORDER BY ' '`photo_city`.`City` ASC') |
C:\Python34\lib\site-packages\django\db\backends\mysql\base.py
in execute
def __init__(self, cursor):
self.cursor = cursor
def execute(self, query, args=None):
try:
# args is None means no string interpolation
return self.cursor.execute(query, args)...
except Database.OperationalError as e:
# Map some error codes to IntegrityError, since they seem to be
# misclassified and Django would prefer the more logical place.
if e.args[0] in self.codes_for_integrityerror:
six.reraise(utils.IntegrityError, utils.IntegrityError(*tuple(e.args)), sys.exc_info()[2])
raise
Variable | Value |
---|---|
args | ('',) |
query | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' '`photo_city` WHERE `photo_city`.`CityCn` REGEXP %s ORDER BY ' '`photo_city`.`City` ASC') |
self | <django.db.backends.mysql.base.CursorWrapper object at 0x000000005B2C2EF0> |
C:\Python34\lib\site-packages\pymysql\cursors.py
in execute
If args is a dict, %(name)s can be used as a placeholder in the query.
"""
while self.nextset():
pass
query = self.mogrify(query, args)
result = self._query(query)...
self._executed = query
return result
def executemany(self, query, args):
# type: (str, list) -> int
"""Run several data against one query
Variable | Value |
---|---|
args | ('',) |
query | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' "`photo_city` WHERE `photo_city`.`CityCn` REGEXP '' ORDER BY " '`photo_city`.`City` ASC') |
self | <pymysql.cursors.Cursor object at 0x00000000569A0D30> |
C:\Python34\lib\site-packages\pymysql\cursors.py
in _query
if not (0 <= r < len(self._rows)):
raise IndexError("out of range")
self.rownumber = r
def _query(self, q):
conn = self._get_db()
self._last_executed = q
conn.query(q)...
self._do_get_result()
return self.rowcount
def _do_get_result(self):
conn = self._get_db()
Variable | Value |
---|---|
conn | <pymysql.connections.Connection object at 0x00000000569A0828> |
q | ('SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, ' '`photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM ' "`photo_city` WHERE `photo_city`.`CityCn` REGEXP '' ORDER BY " '`photo_city`.`City` ASC') |
self | <pymysql.cursors.Cursor object at 0x00000000569A0D30> |
C:\Python34\lib\site-packages\pymysql\connections.py
in query
# print("DEBUG: sending query:", sql)
if isinstance(sql, text_type) and not (JYTHON or IRONPYTHON):
if PY2:
sql = sql.encode(self.encoding)
else:
sql = sql.encode(self.encoding, 'surrogateescape')
self._execute_command(COMMAND.COM_QUERY, sql)
self._affected_rows = self._read_query_result(unbuffered=unbuffered)...
return self._affected_rows
def next_result(self, unbuffered=False):
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
return self._affected_rows
Variable | Value |
---|---|
self | <pymysql.connections.Connection object at 0x00000000569A0828> |
sql | b"SELECT `photo_city`.`id`, `photo_city`.`City`, `photo_city`.`CityCn`, `photo_city`.`CityEs`, `photo_city`.`pinyin`, `photo_city`.`exclude` FROM `photo_city` WHERE `photo_city`.`CityCn` REGEXP '' ORDER BY `photo_city`.`City` ASC" |
unbuffered | False |
C:\Python34\lib\site-packages\pymysql\connections.py
in _read_query_result
result.init_unbuffered_query()
except:
result.unbuffered_active = False
result.connection = None
raise
else:
result = MySQLResult(self)
result.read()...
self._result = result
if result.server_status is not None:
self.server_status = result.server_status
return result.affected_rows
def insert_id(self):
Variable | Value |
---|---|
result | <pymysql.connections.MySQLResult object at 0x000000005B2C2A20> |
self | <pymysql.connections.Connection object at 0x00000000569A0828> |
unbuffered | False |
C:\Python34\lib\site-packages\pymysql\connections.py
in read
def __del__(self):
if self.unbuffered_active:
self._finish_unbuffered_query()
def read(self):
try:
first_packet = self.connection._read_packet()...
if first_packet.is_ok_packet():
self._read_ok_packet(first_packet)
elif first_packet.is_load_local_packet():
self._read_load_local_packet(first_packet)
else:
Variable | Value |
---|---|
self | <pymysql.connections.MySQLResult object at 0x000000005B2C2A20> |
C:\Python34\lib\site-packages\pymysql\connections.py
in _read_packet
# https://dev.mysql.com/doc/internals/en/sending-more-than-16mbyte.html
if bytes_to_read == 0xffffff:
continue
if bytes_to_read < MAX_PACKET_LEN:
break
packet = packet_type(buff, self.encoding)
packet.check_error()...
return packet
def _read_bytes(self, num_bytes):
self._sock.settimeout(self._read_timeout)
while True:
try:
Variable | Value |
---|---|
btrh | 0 |
btrl | 54 |
buff | b"\xffs\x04#42000Got error 'empty (sub)expression' from regexp" |
bytes_to_read | 54 |
packet | <pymysql.connections.MysqlPacket object at 0x000000005B2C22B0> |
packet_header | b'6\x00\x00\x01' |
packet_number | 1 |
packet_type | <class 'pymysql.connections.MysqlPacket'> |
recv_data | b"\xffs\x04#42000Got error 'empty (sub)expression' from regexp" |
self | <pymysql.connections.Connection object at 0x00000000569A0828> |
C:\Python34\lib\site-packages\pymysql\connections.py
in check_error
def check_error(self):
if self.is_error_packet():
self.rewind()
self.advance(1) # field_count == error (we already know that)
errno = self.read_uint16()
if DEBUG: print("errno =", errno)
err.raise_mysql_exception(self._data)...
def dump(self):
dump_packet(self._data)
class FieldDescriptorPacket(MysqlPacket):
Variable | Value |
---|---|
errno | 1139 |
self | <pymysql.connections.MysqlPacket object at 0x000000005B2C22B0> |
C:\Python34\lib\site-packages\pymysql\err.py
in raise_mysql_exception
# couldn't find the right error number
raise InternalError(errno, errorvalue)
def raise_mysql_exception(data):
errinfo = _get_error_info(data)
_check_mysql_exception(errinfo)...
Variable | Value |
---|---|
data | b"\xffs\x04#42000Got error 'empty (sub)expression' from regexp" |
errinfo | (1139, '42000', "Got error 'empty (sub)expression' from regexp") |
C:\Python34\lib\site-packages\pymysql\err.py
in _check_mysql_exception
def _check_mysql_exception(errinfo):
errno, sqlstate, errorvalue = errinfo
errorclass = error_map.get(errno, None)
if errorclass:
raise errorclass(errno, errorvalue)
# couldn't find the right error number
raise InternalError(errno, errorvalue)...
def raise_mysql_exception(data):
errinfo = _get_error_info(data)
_check_mysql_exception(errinfo)
Variable | Value |
---|---|
errinfo | (1139, '42000', "Got error 'empty (sub)expression' from regexp") |
errno | 1139 |
errorclass | None |
errorvalue | "Got error 'empty (sub)expression' from regexp" |
sqlstate | '42000' |
AnonymousUser
Variable | Value |
---|---|
lang | '0' |
key | '%E5%A4%A9%E6%B4%A5' |
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
COMSPEC | 'C:\\windows\\system32\\cmd.exe' |
CONTEXT_DOCUMENT_ROOT | 'C:/itdpchina' |
CONTEXT_PREFIX | '' |
DOCUMENT_ROOT | 'C:/itdpchina' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HTTP_ACCEPT | '*/*' |
HTTP_HOST | 'www.itdp-china.org' |
HTTP_USER_AGENT | 'claudebot' |
PATHEXT | '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW' |
PATH_INFO | '/search/' |
PATH_TRANSLATED | 'C:\\itdpchina\\itdpchina\\wsgi.py\\search\\' |
QUERY_STRING | 'key=%25E5%25A4%25A9%25E6%25B4%25A5&lang=0' |
REMOTE_ADDR | '34.230.68.214' |
REMOTE_PORT | '55722' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'http' |
REQUEST_URI | '/search/?key=%25E5%25A4%25A9%25E6%25B4%25A5&lang=0' |
SCRIPT_FILENAME | 'C:/itdpchina/itdpchina/wsgi.py' |
SCRIPT_NAME | '' |
SERVER_ADDR | '172.31.144.36' |
SERVER_ADMIN | 'admin@example.com' |
SERVER_NAME | 'www.itdp-china.org' |
SERVER_PORT | '80' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SIGNATURE | '' |
SERVER_SOFTWARE | 'Apache/2.4.10 (Win64) OpenSSL/1.0.1j mod_wsgi/4.4.22 Python/3.4.4' |
SystemRoot | 'C:\\windows' |
WINDIR | 'C:\\windows' |
apache.version | (2, 4, 18) |
mod_wsgi.application_group | 'www.itdp-china.org|' |
mod_wsgi.callable_object | 'application' |
mod_wsgi.enable_sendfile | '0' |
mod_wsgi.handler_script | '' |
mod_wsgi.path_info | '/search/' |
mod_wsgi.process_group | '' |
mod_wsgi.request_handler | 'wsgi-script' |
mod_wsgi.request_start | '1711679219336525' |
mod_wsgi.script_name | '' |
mod_wsgi.script_reloading | '1' |
mod_wsgi.script_start | '1711679219337500' |
mod_wsgi.version | (4, 4, 22) |
wsgi.errors | <_io.TextIOWrapper encoding='utf-8'> |
wsgi.file_wrapper | '' |
wsgi.input | <mod_wsgi.Input object at 0x0000000059ABE620> |
wsgi.multiprocess | False |
wsgi.multithread | True |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
itdpchina.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['127.0.0.1', 'localhost', 'www.itdp-china.org', '*'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'itdpuser.ItdpUser' |
BASE_DIR | 'C:\\itdpchina' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', 'TIMEOUT': 600}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CORS_ALLOW_CREDENTIALS | True |
CORS_ALLOW_HEADERS | ('XMLHttpRequest', 'X_FILENAME', 'accept-encoding', 'authorization', 'content-type', 'dnt', 'origin', 'user-agent', 'x-csrftoken', 'x-requested-with', 'Pragma') |
CORS_ALLOW_METHODS | ('DELETE', 'GET', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'VIEW') |
CORS_ORIGIN_ALLOW_ALL | True |
CORS_ORIGIN_WHITELIST | ('*',) |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': '127.0.0.1', 'NAME': 'itdpchina2', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'anonuser'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'N j, Y, P' |
DATETIME_INPUT_FORMATS | ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] |
DATE_FORMAT | 'N j, Y' |
DATE_INPUT_FORMATS | ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | '.' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_CONTENT_TYPE | 'text/html' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'smtp.126.com' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | 'ben216@126.com' |
EMAIL_PORT | 25 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | True |
FILE_CHARSET | 'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'itdpweb', 'photolib', 'itdpparking', 'itdpbike', 'itdpbrt', 'itdpmobile', 'docklessbike', 'itdpuser', 'corsheaders', 'DjangoUeditor'] |
INTERNAL_IPS | [] |
LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'zh_Hans' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | [] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | 'C:\\itdpchina\\media' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | None |
MIDDLEWARE_CLASSES | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'itdpweb.middleware.RequestBlockingMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'itdpchina.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'ben216@126.com' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'itdpchina.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
STATICFILES_DIRS | [] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | 'C:\\itdpchina\\static' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['C:\\itdpchina\\templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'Asia/Singapore' |
USE_ETAGS | False |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | False |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'itdpchina.wsgi.application' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
YEAR_MONTH_FORMAT | 'F Y' |
You're seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard page generated by the handler for this status code.