近期报错合集 10.14

一、安装psycopg2报错(pip install psycopg2)

近期报错合集 10.14

解决:使用pip install psycopg2-binary命令

 

二、请求raw.githubusercontent.com时提示:failed: Connection refused

原因:某些原因导致GitHub的raw.githubusercontent.com域名解析被污染了。     

解决:https://www.ipaddress.com/,查询raw.githubusercontent.com的真实IP,并添加到hosts文件即可解决

 

三、pymysql连接数据库报错:'NoneType' object has no attribute 'encoding''

解决:原utf-8,修改为utf8

近期报错合集 10.14

 

四、flask 启动报错:The requested URL was not found on the server

原因:客户端的请求中的url在服务器端的python文件中的@app.route()中找不到,没有定义对应url语句以及相关处理函数。

解决:添加@app.route('/')对应url