editor 的文章
-
flask web开发注意事项
一、连接数据库 连接mysql的时候需要添加autocommit=True,否则当修改数据库的时候,数据库数据已经发生变化,但是flask还是读取修改前的数据。 中间件 middl…… -
es报错:this action would add [2] shards, but this cluster currently has [999]/[1000] maximum normal shards open
一、原因与解决方案 这个是分片不足导致,ES7版本以上,默认的最大分片数是1000, 所以最直接的解决方案就是增大ES的maximum shards。 有2种方法:1是通过kiban…… -
centos /etc/rc.d/rc.local 自启动不生效问题
在CentOS7中,官方将/etc/rc.d/rc.local 的开机自启的权限禁止掉了,他为了兼容性,设置了这个,但是并不默认启动.如果需要的话.执行以下代码 chmod +x /etc/rc.d/…… -
centos journalctl日志查看
1.journalctl命令作用:Systemd 统一管理所有 Unit 的启动日志。可以只用journalctl一个命令,查看所有相关日志(内核日志和应用日志)。日志的配置文件是/etc…… -
centos 安装dnsmasq
1. 安装 yum -y install dnsmasq 开放udp tcp 53 端口 2. 修改配置文件 dnsmasq.conf vi /etc/dnsmasq.conf #指定上游dns服务器 resolv-file=/etc/resolv.dnsm…… -
python logging
import logging # create logger logger_name = "example" logger = logging.getLogger(logger_name) logger.setLevel(logging.ERROR) # create file…… -
VSCode终端出现乱码
1. 字符编码原理 VSCode终端调用的是cmd.exe,使用中文出现乱码时,需要解决cmd的编码设置。 可以通过chcp命令来查看当前cmd的编码设置 chcp GBK2312的编码是9…… -
python爬虫zol图片库
import requests from lxml import html import re from concurrent.futures import ThreadPoolExecutor etree = html.etree def get_detail_href(url)…… -
-
centos7下报错: import requests ImportError: No module named requests
1、看好python版本,是python2 还是python3,然后pip 安装requests。 pip3 install requests 2、如果安装了requests执行脚本还是报错,则需要安装python-req……
友情链接 CSDN
申请友链