![](https://img-blog.csdnimg.cn/2019091813595558.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
python错误收集
python错误收集
why123wh
这个作者很懒,什么都没留下…
展开
-
python-docx使用document读取文件报错:docx.opc.exceptions.PackageNotFoundError: Package not found at
文章目录报错详情原因解决办法疑问报错详情原因执行到document=Document(word_path)时报错,python-docx模块无法读取该文件def open_file(word_path,excel_path,excel_sheet_name): #打开word文档 document=Document(word_path) tables=document.tables table_indexs=len(tables) #打开excel原创 2020-05-08 22:40:41 · 6200 阅读 · 0 评论 -
vim插件报错Error detected while processing /root/.vim/bundle/python-mode/autoload/pymode/lint.vim
报错Error detected while processing /root/.vim/bundle/python-mode/autoload/pymode/lint.vim解决方案缺少pylama模块,安装即可pip3 install pylama原创 2020-04-13 16:50:43 · 1806 阅读 · 2 评论 -
np.onses报错:TypeError: data type not understood
文章目录报错原因解决方法报错---------------------------------------------------------------------------TypeError Traceback (most recent call last)<ipython-input-20-ae3797d554b...原创 2020-04-08 12:15:05 · 312 阅读 · 0 评论 -
安装mysqlclient模块报错:python setup.py egg_info Check the logs for full command output
报错如下原因缺少mysql源/bin/sh: mysql_config: command not found解决方法下载安装mysql源wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpmyum install mysql-devel安装mysqlclient成功...原创 2020-04-03 11:38:24 · 1990 阅读 · 1 评论 -
字符串转字典报错:ValueError: dictionary update sequence element #0 has length 1; 2 is required
字符串转字典data = opener.open(url)data=data.read().decode('utf-8')data=dict(data)报错如下ValueError: dictionary update sequence element #0 has length 1; 2 is required解决方法使用python 内置函数eval将字符串转为字典eva...原创 2020-04-01 14:34:07 · 7899 阅读 · 0 评论 -
'NoneType' object is not subscriptable
文章目录报错详情原因解决方法报错详情TypeError Traceback (most recent call last)<ipython-input-60-ded50b25f427> in <module> 3 print(type(nums)) 4 solution_sort ...原创 2020-03-26 12:03:29 · 9941 阅读 · 0 评论 -
UnboundLocalError: local variable 'dst_sheet' referenced before assignment
报错如下UnboundLocalError: local variable 'dst_sheet' referenced before assignment代码原因局部变量dst_sheet赋值前被引用局部变量与全局变量名相同原创 2020-03-24 12:43:59 · 738 阅读 · 0 评论 -
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 4: illegal multibyte sequence
代码 if os.path.exists(music_list_name): with open(music_list_name, 'r') as f: music_list = list(map(lambda x: x.strip(), f.readlines())) for song_num, song_name in enume...原创 2020-01-22 10:23:08 · 1466 阅读 · 0 评论 -
TypeError: 'list' object cannot be interpreted as an integer
原因执行如下语句导致报错 if i not in range(list_skip): print (i)改为 if i not in list_skip: print (i)执行成功原创 2019-12-17 14:06:50 · 1456 阅读 · 0 评论 -
DeprecationWarning: Call to deprecated function get_sheet_by_name (Use wb[sheetname])
使用wb.get_by_sheet_name出现以上警告wb=openpyxl.load_workbook('E:\ProgrammerCode\Python\AutomateTheBoringStuff\selenium\AutoArrangementDocument\Source\告警IP列表Top20-1212.xlsx')sheet=wb.get_sheet_by_name('1211...原创 2019-12-12 23:00:58 · 16168 阅读 · 0 评论