![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
环境部署
程序员阿德
这个作者很懒,什么都没留下…
展开
-
运行gunicorn失败:[ERROR] Connection in use: ('0.0.0.0', 8000)
参考:https://pdf-lib.org/Home/Details/5262 执行命令:gunicorn -w 4 -b 0.0.0.0:8000 wsgi:app,遇到如下错误:[2019-01-10 17:17:13 +0800] [31665] [INFO] Starting gunicorn 19.9.0[2019-01-10 17:17:13 +0800] [3166...原创 2019-01-10 17:25:31 · 7283 阅读 · 0 评论 -
supervisord ERROR : Error: File contains no section headers.
执行命令 supervisord -c /etc/supervisord.conf 时,报错:Error: File contains no section headers.file: '/etc/supervisor/conf.d/imgweb.conf', line: 1';/etc/supervisor/conf.d/imgweb.conf\n'For help, use /ho...原创 2019-01-11 15:55:49 · 4550 阅读 · 0 评论 -
Nginx出现500 Internal Server Error 错误
参考: Nginx出现500 Internal Server Error 错误的解决方案 原因1:我要实现接收图片并保存在项目的 static/images/ 目录下,我在代码有这两句:file_path = os.path.join('./static/images', filename)upload_file.save(file_path)但是我没有在 static/...原创 2019-01-11 16:49:17 · 1060 阅读 · 0 评论 -
502 bad Gateway & supervisorctl status : EXITED
我使用 postman 发送get请求,提示502的错误。 在服务器上使用 supervisorctl status 查看该进程状态,显示为 EXITED, 在参考文章中得知该状态表示:PROCESS_STATE_EXITED 进程状态由正在运行转换为退出 应该是代码本身的问题,检查后发现,我在两个模块之间相互导入了。 还有一个方法,找到该服务程序在 /e...原创 2019-01-17 18:23:26 · 1363 阅读 · 0 评论 -
gunicorn.errors.HaltServer: HaltServer 'App failed to load.' 4
在安装gunicorn时,执行下面的代码出现错误:from flask import Flaskapp = Flask(__name__)@app.route('/')def index(): # return 'hello world'if __name__ == '__main__': app.run(debug=True)使用命令:gunicorn w...原创 2019-01-09 16:02:08 · 4396 阅读 · 0 评论 -
flask url_for 图片URL 缺少端口号
参考:https://q.cnblogs.com/q/103812/Flask中关于url_for()的坑:https://blog.csdn.net/yannanxiu/article/details/52287870 需要flask返回服务器上静态文件的url地址:return url_for('static', _external=True, filename='image...原创 2019-01-15 18:27:39 · 867 阅读 · 0 评论 -
supervisorctl start wsgi 报错:wsgi: ERROR (no such file)
这是我的配置文件:/etc/supervisor/conf.d/wsgi.conf[program:wsgi]command=gunicorn -w 4 -b 0.0.0.0:8000 wsgi:appdirectory=/home/ejior/Documents/flask/demo1 ; 项目的文件夹路径startsecs=...原创 2019-01-10 11:20:26 · 2809 阅读 · 0 评论 -
RuntimeError: CUDA error: all CUDA-capable devices are busy or unavailable
在使用pytorch构建网络时, 执行model.cuda()时, 出现标题上的错误, 还会报如下错误 :RuntimeError: cuda runtime error (30) : unknown error at /opt/conda/conda-bld/pytorch_1544199946412/work/aten/src/THC/THCGeneral.cpp:51 目前网...原创 2019-01-29 16:22:36 · 11396 阅读 · 6 评论 -
pip 安装包超时问题
我参考的文章如下:https://www.jianshu.com/p/8e042b7e91b6我用的解决方法是最后一个,即加个--default-timeout=100 参数。比如:pip --default-timeout=100 install protobuf==3.4.0...原创 2019-08-28 09:17:05 · 434 阅读 · 0 评论