A
B
C
D
E
-
ERRORS:myApp.Students.scontend: (fields.E120) CharFields must define a ‘max_length’ attribute.
- CharFields类型必须添加max_length属性
-
Exception: HTTP 599: SSL certificate problem: unable to get local issuer cer
- 在self.crawl()最后加上validate_cert=False参数
F
- from django.urls import path ImportError: cannot import name 'path’
- django2.0以上才支持 from django.urls import path。django1.x是 from django.conf.urls import url
G
H
I
- ImportError: cannot import name 'DispatcherMiddleware’
- werkzeug的版本为1.0.0,这个版本中没有DispatcherMiddleware方法 。 卸载werkzeug,重新安装低版本的werkzeug==0.16.0
J
- json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
-
问题在json里只能用双引号,不能用单引号!
json.loads(xxx.replace("'", '"'))
-
里面有多行多列, 可以逐行读取
for line in xx.readlines()
-
K
L
M
N
O
P
Q
R
- RuntimeError: Queue objects should only be shared between processes through inheritance
- 进程间通信用:
from multiprocessing import Queue
- 进程池间通信用:
from multiprocessing import Manager().Queue
- 进程间通信用:
S
- SyntaxError: Non-UTF-8 code starting with ‘\xe7’ in file
-
在文件顶部添加
# -*- coding:utf-8 -*-
-
T
- TypeError: not all arguments converted during string formatting
- 字符占位符前后不匹配
U
-
urllib.error.URLError: <urlopen error [Errno 11001] getaddrinfo failed>
- 将
'https://xxx.com'
改为"https://xxx.com"
- 将
-
urllib.error.URLError:
- url地址可能不正确
V
- ValueError: Invalid configuration: - Deprecated option ‘domaincontroller’: use 'http_authenticator
-
找到错误提示的文件
File "f:\envs\pachong\lib\site-packages\pyspider\webui\webdav.py", line 216, in <module>
-
将209行代码
'domaincontroller: NeedAuthController(app),'
修改为
'http_authenticator':{'HTTPAuthenticator':NeedAuthController(app)},
-