
python
那条还没翻身的咸鱼
希望一直在~
展开
-
python-合并excel
合并同一文件夹下的所有工作簿,python3实现代码。原创 2024-06-20 17:47:50 · 119 阅读 · 0 评论 -
python3定时执行脚本(windows版)
这里写自定义目录标题目的步骤目的py脚本已经编写好了,此时需要定时执行脚本,可以借助windows-【任务计划程序】步骤打开程序二、(右击)创建基本任务按内容填写,下一步…下一步…完成!...原创 2022-04-14 21:15:00 · 363 阅读 · 0 评论 -
python3字符串包含斜杠‘\‘时
需求:当获取的字符中包含斜杠’'时,需要把字符串转换为dict,那么需要先对字符串中的斜杠做转换,否则会报以下异常:json.decoder.JSONDecodeError: Invalid \escape: line 1 column 38 (char 37)代码处理:import json# 转换成字符串类型str = '{"resultSet": [{"dm": "1", "mc": "广东省\广州市\天河区"}]}'print('原字符串为:' + str)# str 转原创 2022-04-06 15:42:10 · 2596 阅读 · 0 评论 -
python3 报错json.decoder.JSONDecodeError: Invalid \escape: line 1 column 31616 (char 31615)
报错报错代码:s_rep = client.service.callWebService(serviceName=s_name, userName=userName, password=s_pass, param=‘’)s_rep_result = json.loads(s_rep)继处理上个异常TypeError: string indices must be integers后,紧接抛出异常Traceback (most recent call last): File "E:kc.py"原创 2022-04-06 11:01:37 · 2548 阅读 · 0 评论 -
python3 报错TypeError: string indices must be integers
报错提示Traceback (most recent call last):File “E:\kc.py”, line 27, in s_rep_result = s_rep[‘resultSet’]TypeError: string indices must be integers原因分析JSON格式导致的错误:s_rep = client.service.callWebService(serviceName=s_name, userName=userName, password=s_pas原创 2022-04-06 10:28:53 · 1163 阅读 · 0 评论