redis.exceptions.DataError: Invalid input of type: ‘dict‘. Convert to a bytes, string, int or float python redis版本太高pip install redis==2.10.6
爬虫-xml文件解析 爬取某网站,需要从xml文件中解析数据 def test1(self): for num in range(1,56): url = "http://gb.shandong.gov.cn/module/web/jpage/dataproxy.jsp?page={}&webid=410&path=http://www.shandong.gov.cn/&columnid=107851&unitid=283644&webn.
linux >> 2>&1的含义 首先说 >> 和 > 的区别>>是追加>是重新覆盖实际操作的区别[root@jxw-wwzct-6 zwyuser]# date > date.log[root@jxw-wwzct-6 zwyuser]# cat date.log Fri Nov 13 08:31:56 CST 2020[root@jxw-wwzct-6 zwyuser]# date > date.log[root@jxw-wwzct-6 zwyuser]# cat da.
linux scarpy twisted wget --no-check-certificate https://pypi.python.org/packages/source/T/Twisted/Twisted-15.2.1.tar.bz2 tar -xjvfpython setup.py install
docker拉取镜像慢解决方案 参考(https://www.cnblogs.com/sxdcgaq8080/p/9198748.htmlhttps://cr.console.aliyun.com/cn-beijing/instances/mirrorshttps://www.runoob.com/linux/linux-comm-tee.html
python遍历redis hash的几种方式 迭代器方式,返回的是元组def test1(): for key in re_conn.hscan_iter('aqc_seed'): print(key) print(key[0]) print(key[1])
yum重新安装采坑记录 文章目录安装参考博客BUG安装安装参考参考博客https://www.cnblogs.com/alantop/p/13456268.htmlhttps://blog.csdn.net/qq_27088383/article/details/108729324https://blog.csdn.net/weixin_42067154/article/details/102787525https://blog.csdn.net/Homewm/article/details/80642851BU
centos安装docker详细步骤及采坑记录 文章目录前言参考的博客bug安装前言帮公司在某台服务器部署docker环境,但事情似乎并不是那么简单……参考的博客bugLoaded plugins: securitySetting up Remove ProcessNo Match for argument: dockerError: File contains parsing errors: file:///etc/yum.repos.d/docker-ce.repo [line 63]: irrors.aliyun.com/do
/etc/host.conf: line 3: bad command `nospoof on‘ Loaded plugins: fastestmirror, langpacks 重新启动网络试一下service network restart参考
user-agent收集 import randomuser_agent = [ "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1", "Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/5
随笔 上午把阿里云续费了一年,构思了一上午想做一个博客网站。中午吃饭回来,一楼等电梯的时候,有个小哥,是个残疾人,双腿不能直立,但是人家真的很为别人着想,自己进去,用手机挡住电梯门,等所有人都进来,快关门的时候,有人没进来,又打开电梯门,用手机拦住电梯,等人家进来。有时候真的应该为自己感到幸运,自己在生活中竟然还会有这么多牢骚。可笑,关爱他人,这操蛋的人生还是很值得我留恋的!...
Python数据结构与算法分析(第2版)阅读笔记 文章目录下载正文下载链接:https://pan.baidu.com/s/19ziYjJq8JtFZMCevsyIW2A 提取码:fjlk 复制这段内容后打开百度网盘手机App,操作更方便哦正文中序表达式,前序表达式,后续表达式
政和-工作记录-记录一次pycharm debug 调试 打断点插入sql时报错复制sql在工具里运行,报错错误[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]‘A15F51E’ 附近有语法错误。 (102)出错原因
ERROR: Failed building wheel for Twisted 我在 window 下出现这个错误进入此网站https://www.lfd.uci.edu/~gohlke/pythonlibs/搜索 twisted下载对应 python版本 和 win位数的轮子本人是 python3.8 win 64位处理我使用的为 anaconda环境管理进入项目对应的虚拟环境的目录下的 Script文件夹pip install 刚才下载的文件就OK了...
scrapy return pickle.loads(s) builtins.ValueError: unsupported pickle protocol: 5 今天运行项目莫名报错return pickle.loads(s)builtins.ValueError: unsupported pickle protocol: 5github
html2text 手册import html2texth = html2text.HTML2Text()h.ignore_links = Truedate = etree.tostring(date[0], encoding='utf-8', pretty_print=False, method='html')date = date.decode('utf-8')date = h.handle(date).strip()
etree.tostring content = html.xpath("//div[contains(@class,'art_content')]")content = etree.tostring(content[0], encoding='utf-8', pretty_print=False, method='html')content = content.decode('utf-8')
(241, b‘Conversion failed when converting date and/or time from character string.DB-Lib error messag Base_UpdateTime = time.strftime( '%Y-%m-%d %X', time.localtime(time.time()))
感悟100则 1:能不抽烟最好不抽,它或许可以帮助你吸引一些女生,但不抽绝不会招来厌烦,表现男子气概的途径有很多,没必要拿健康做赌注。2:给自己定目标,一年,两年,五年,也许你出生不如别人好,通过努力,往往可以改变70%的命运。破罐子破摔只能和懦弱做朋友。3:找女朋友外表是第一关,但要了解她的品行之后再做打算也不迟。4:不要在乎小钱,工作的人都后悔从前对自己的GF不够好。记住你们的重要日子,你们的谈话,女生要敏感得多,这样做,至少可以证明你对她的重视。5:爱她,但别怕她,你们是恋人,也是朋友,她要的不是宠物,这样
redis取出来的字符串为二进制格式/python与redis交互取出来的数据为bytes类型 self.re_conn = redis.Redis(host="192.168.2.101", db=0, port=6379,decode_responses=True)加一个参数就可以了
爬虫 mongo判断重复 逻辑爬取网页源代码和从源代码解析数据分开进行爬取的源码存储到 mongo 多线程解析也是用多线程,可能会遇到重复解析处理数据的情况解决思路将存到mongo的每一个网页数据的唯一表示存储到redis,通过唯一标识来定位需要处理的数据,处理完就pop出去因为redis是单线程的,即使使用多线程处理数据,也不会造成数据的重复处理...
mongo存入数据为字符串,读取出来却为元组? 千万不要感冒啊!企业的基本信息和法律诉讼信息存到 mongo 中,他们相互关联的标志为 uuid企业基本信息中 _id法律诉讼信息中 com_id这时候问题出现了,存入的为字符串格式这尼玛是什么情况?...
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your PATH. 参照-问题1
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 问题2
ERROR: Failed building wheel for backports.lzma building ‘backports.lzma._lzma‘ extension error 参考错误1
pandas读取表格所有的sheet reader = pd.ExcelFile(path + name) sheet_names = reader.sheet_names for sheet in sheet_names: df = pd.read_excel(path + name,sheet_name=sheet) print(df) companys = df['申请单位名称'].values print(companys)
python获取指定文件夹下面的所有的文件名称 path = "/tmp/pycharm_project_683/task_1/" + my_type + '/'print(path)files = os.listdir(path)
requests测试代理是否设置成功 p = requests.get('http://icanhazip.com', headers= headers, proxies=proxies)print(p.text)p = requests.get('http://icanhazip.com', headers= headers)print(p.text)代理设置成功
Object of type bytes is not JSON serializable https://www.cnblogs.com/qiqi-yhq/articles/12557870.html检查字典的值有没有 byte类型的