随笔分类 -  python问题及解决办法集合

摘要:详细分析请参考:https://blog.csdn.net/weixin_42681866/article/details/104786293?utm_medium=distribute.pc_relevant_bbs_down.none-task-blog-baidujs-1.nonecase&d 阅读全文
posted @ 2021-02-07 15:00 垄上行 阅读(625) 评论(0) 推荐(0) 编辑
摘要:if chardet.detect(str(l))['encoding'] == 'ascii': l = l.decode("ascii").encode("unicode_escape") 阅读全文
posted @ 2021-01-07 10:06 垄上行 阅读(186) 评论(0) 推荐(0) 编辑
摘要:获取cookie思路: 1、确认登录login接口,及登录所需参数(包括用户名、密码、uuid等参数); 2、确认uuid等参数的获取接口(一般是get请求); 3、凭借uuid等参数向login接口发起请求,获取响应报文中的cookie(不同的网站平台可能表示方法不一样,需区别对待); 示例代码: 阅读全文
posted @ 2020-12-31 14:37 垄上行 阅读(2039) 评论(0) 推荐(0) 编辑
摘要:r = requests.post(request_url,data=requestJSONdata,headers=head)报错: Exception: ('Connection broken: IncompleteRead(3794 bytes read, 4398 more expected 阅读全文
posted @ 2020-12-31 10:07 垄上行 阅读(2896) 评论(0) 推荐(0) 编辑
摘要:提示/app/rf_automation/eggcache被其他组/用户写入了,容易出现攻击。 解决办法: 修改组/其他用户的访问权限即可。 chmod 755 /app/rf_automation/eggcache/ 阅读全文
posted @ 2020-10-13 15:33 垄上行 阅读(215) 评论(0) 推荐(0) 编辑
摘要:错误日志: *** Operational MODE: preforking *** Traceback (most recent call last): File "./rf_automation/__init__.py", line 4, in <module> from .celery imp 阅读全文
posted @ 2020-10-13 15:06 垄上行 阅读(374) 评论(0) 推荐(0) 编辑
摘要:RPC是Remote Procedure Call的缩写,翻译成中文就是远程方法调用,是一种在本地的机器上调用远端机器上的一个过程(方法)的技术,这个过程也被大家称为“分布式计算”,是为了提高各个分立机器的“互操作性”而发明出来的技术。 XML-RPC的全称是XML Remote Procedure 阅读全文
posted @ 2019-10-30 11:39 垄上行 阅读(816) 评论(0) 推荐(0) 编辑
摘要:在cmd命令前加 : python -m 命令(如:python -m celery -A tasks worker --loglevel=info) -m: 将库中的python模块用作脚本去运行,相当于import. 阅读全文
posted @ 2019-08-27 16:12 垄上行 阅读(2390) 评论(0) 推荐(0) 编辑
摘要:实际的python执行的软连接是路径是/opt/python2.7/bin/python,而设置的软连接错误如下: 修改该连接,是python指向/opt/python2.7/bin/python, lrwxrwxrwx. 1 root root 25 Jan 29 16:53 python ->  阅读全文
posted @ 2019-01-29 17:34 垄上行 阅读(4003) 评论(0) 推荐(0) 编辑
摘要:linux下执行python后显示被拒绝问题定位: 1、检查下要执行的文件的权限是否存在执行权限,否则执行chmod命令赋予权限; 2、若赋予权限后仍然显示没有权限,检查下执行的python文件是否有权限,否则执行chmod赋予执行权限。 显示/opt/python2.7/bin路径下的python 阅读全文
posted @ 2019-01-29 17:17 垄上行 阅读(15172) 评论(0) 推荐(0) 编辑
摘要:python 2.7 print 的数据中若包括中文,打印则会报错UnicodeDecodeError: 'gbk' codec can't decode bytes in position 459-460: illegal multibyte sequence, 错误原因:将一个字符串,通过gbk 阅读全文
posted @ 2018-12-28 16:02 垄上行 阅读(911) 评论(0) 推荐(0) 编辑
摘要:for index,value in enumerate(listvalue): adchar=chardet.detect(value) print adchar if adchar['encoding']=='utf-8' or adchar['encoding']=='ascii': code 阅读全文
posted @ 2018-11-21 11:10 垄上行 阅读(6850) 评论(0) 推荐(1) 编辑
摘要:获取excel多列方法: 阅读全文
posted @ 2018-09-20 14:43 垄上行 阅读(5389) 评论(0) 推荐(0) 编辑
摘要:转自:https://blog.csdn.net/zklth/article/details/8117207 新建一个register.py文件,执行该文件,完成python的注册。 阅读全文
posted @ 2018-09-07 11:22 垄上行 阅读(257) 评论(0) 推荐(0) 编辑
摘要:转自:https://blog.csdn.net/s740556472/article/details/68557330 pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ lxml 阅读全文
posted @ 2018-09-06 16:42 垄上行 阅读(1948) 评论(0) 推荐(0) 编辑
摘要:UnicodeDecodeError: 'gbk' codec can't decode bytes in position 2-3: illegal multibyte sequence 失败原因:原文件中文是UTF-8编码,现在用gbk解码则会报错,编码和解码方法不一致所致; 解决办法:先确认原 阅读全文
posted @ 2018-08-31 10:12 垄上行 阅读(10191) 评论(0) 推荐(0) 编辑
摘要:新版本执行:pip list 老版本执行:pip freeze 阅读全文
posted @ 2018-06-11 11:54 垄上行 阅读(9585) 评论(0) 推荐(0) 编辑
摘要:1、卸载时报这个错,先进行下修复,再执行卸载; 2、安装时报这个错,安装的过程中,没有取得管理员的权限。 Msi格式的文件,点右键后,也没有“以管理员身份运行”的菜单项,那怎么办呢?你可以点“开始”菜单,点“所有程序”,点开“附件”,在“命令提示符”上点右键,选择“以管理员身份运行”。弹出 如下窗口 阅读全文
posted @ 2018-01-02 11:21 垄上行 阅读(27881) 评论(1) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-06-08 10:50 垄上行 阅读(6807) 评论(0) 推荐(0) 编辑
摘要:方法:多个命令之间用“;”进行连接即可; 阅读全文
posted @ 2017-05-25 17:22 垄上行 阅读(2497) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示