![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Bug汇总
爱问西瓜爱大树
这个作者很懒,什么都没留下…
展开
-
No matching distribution found for docx(配置cmd控制台代理)
问题描述:在终端想给电脑安装docx包,用pip install docx命令安装时,报如下错误:解决方法:1、pip版本太低,我的python是3.6.5的2、Tunnel connection failed: 407 Proxy Authentication Required。由这句报错可知,结合是公司内网环境,可能是代理问题,配置代理如下:set http_proxy=http:...原创 2019-10-11 17:50:07 · 1373 阅读 · 0 评论 -
conda:Could not find a version that satisfies the requirement XXX
在根据这篇博客安装labelme时,用pip命令安装包会报如下错误:这是因为网络的问题,需要使用国内的镜像源来加速,比如豆瓣源在后面加上就可以了pip install PyQt5 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.compip install labelme -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com参考:pip 安原创 2021-03-23 11:23:33 · 1138 阅读 · 1 评论 -
conda An unexpected error has occurred
错误描述:只要使用conda命令进行卸载或者安装包就会报这个错误:解决方法:将“C:\Users\你的用户名”文件夹下的~/.condarc文件删掉即可。参考:ubuntu下使用conda创建/安装失败 错误 提示:An unexpected error has occurred...原创 2021-01-07 13:54:39 · 3728 阅读 · 1 评论 -
tensorflow安装中踩到的坑protobuf、h5py、tensorboard、werkzeug
安装好tf后,报各种与这几个包相关的错误:protobuf、h5py、tensorboard、werkzeug解决方法:版本不一致导致。tensorflow包和protobuf、h5py、tensorboard、werkzeug这几个包都有紧密联系,如果这些包来自不同的源,就有可能会报各种奇怪的错误。这时候只能将这些包都卸载干净(用conda和pip3命令反复卸载,最后再确认是否卸载干净),然后重新用conda命令重新安装tf。conda install tensorflow==1.14.0.原创 2020-12-29 14:39:19 · 1515 阅读 · 0 评论 -
CondaHTTPError: HTTP 000 CONNECTION FAILED for url ...... 解决过程
使用anaconda创建一个新的环境,执行“conda install”命令,结果出现了“CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/current_repodata.json”。以下是我的解决步骤。一、电脑的环境操作系统:windows10 64位Anaconda版本:conda 5二、解决步骤进入”C:\Use原创 2020-12-29 14:18:26 · 4076 阅读 · 3 评论 -
HDF5 library version mismatched error
运行tensorflow,报错如下:Warning! ***HDF5 library version mismatched error***The HDF5 header files used to compile this application do not matchthe version used by the HDF5 library to which this application is linked.Data corruption or segmentation faults may原创 2020-12-29 14:02:47 · 829 阅读 · 1 评论 -
win10 tensorflow 和numpy兼容性问题 No module named ‘numpy.core._multiarray_umath‘
问题:在导入tensorflow包时,总是报如下问题: No module named 'numpy.core._multiarray_umath'尝试重装numpy,使得numpy兼容tf,换了好几个np版本都不行。解决方案:重装tf 1.14,安装tensorflow时,它自动安装numpy。卸载命令:pip3 uninstall tensorflow安装命令:conda install tensorflow==1.14...原创 2020-12-22 15:36:50 · 409 阅读 · 0 评论 -
SSL peer shut down incorrectly
问题描述想把安卓工程打包成SDK,修改好app下的gradle文件后,sync,接着Rebuild Project,报了如题所示错误。解决方法修改工程的build.gradle配置:将buildscript节点、allprojects节点下的repositories改成如下: google() maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } jcenter()参考:A原创 2020-11-23 11:28:19 · 3018 阅读 · 0 评论 -
Android Studio新建工程syncing失败;Android studio Connection timed out: connect
最近Android Studio突然抽风,无论打开自己以前运行成功的工程还是新建工程,都无法成功syncing。报错现象包含以下内容的基本可以按照我的帖子内容进行解决:1、一直卡在configure build阶段;2、403forbidden3、需要xxxxx.pom文件的问题4、HttpHostConnectException5、Could not resolve all artifacts for configuration ‘:classpath’.6、Android studio Co原创 2020-11-10 03:31:11 · 1039 阅读 · 3 评论 -
Some of the operators in the model are not supported by the standard TensorFlow Lite runtime.
用TensorFlow Lite转换模型时,报如下错误:Some of the operators in the model are not supported by the standard TensorFlow Lite runtime. If those are native TensorFlow operators, you might be able to use the extended runtime by passing --enable_select_tf_ops, or by se原创 2020-10-20 13:43:56 · 239 阅读 · 0 评论 -
TypeError: TF_SessionRun_wrapper: expected all values in input dict to be ndarray
首先用管理员的权限打开cmd:输入:pip uninstall numpypip install numpy (加入上一步报错)pip install -U numpy参考:解决tensorflow模型保存时Saver报错:TypeError: TF_SessionRun_wrapper: expected all values in input dict to be ndarray...原创 2020-10-20 11:19:01 · 603 阅读 · 0 评论 -
No module named ‘wrapt‘
重装:pip3 uninstall wraptpip3 install wraptpython已安装wrapt包却提示报错ModuleNotFoundError: No module named ‘wrapt’原创 2020-10-20 11:13:01 · 3213 阅读 · 1 评论 -
InvalidArchiveError(‘Error with archive D:\\Program Files\\Anaconda\\pkgs\\numpy-base-1.19.1-py36ha3
在cmd用conda install numpy命令安装numpy时,报如下错误:InvalidArchiveError('Error with archive D:\\Program Files\\Anaconda\\pkgs\\numpy-base-1.19.1-py36ha3解决方法:1、找到D:\Program Files\Anaconda文件夹2、选择anaconda3文件夹右键属性3、点击安全,为所有用户添加“完全控制”权限4、关闭cmd,关闭所有打开了python终端的程序,原创 2020-10-20 11:11:09 · 5893 阅读 · 0 评论 -
must be str,not int
在python里将dataframe写入mysql数据库时,报如题错误,刚开始以为是dataframe和mysql的字段不对应。后来发现是连接mysql的语句中,端口号应该是字符串,而不是整型。原创 2020-07-17 16:27:23 · 1228 阅读 · 0 评论 -
Error: Error while compiling statement: FAILED: ParseException line 1:20 cannot recognize input near
在hive执行这个语句的时候报如下错误:Error: Error while compiling statement: FAILED: ParseException line 1:20 cannot recognize input near 'as' 'date' ',' in selection target 原因:date可能是hive的一个保留字,不能用做别名。...原创 2020-07-17 16:23:26 · 14491 阅读 · 1 评论 -
warning: control may reach end of non-void function [-Wreturn-type]
用Android studio开发时,构建时报如题错误。它的意思是:控制到达非void函数的结尾。就是说你的一些本应带有返回值的函数到达结尾后可能并没有返回任何值。这时候,最好检查一下是否每个控制流都会有返回值。参考:warning: control reaches end of non-void function...原创 2020-03-31 11:19:13 · 2215 阅读 · 0 评论 -
Cannot open D:\Program Files\Anaconda\Scripts\pip3-script.py
在安装tensorflow时报了如标题所示错误。解决方法:重装pip:easy_install -U pip==19.1.1再重新装tensorflow:pip3 install tensorflow-gpu==1.14.0参考:出现 Cannot open D:\Program Files\Anaconda3\Scripts\pip-script.py 错误解决办法...原创 2020-01-16 16:39:11 · 374 阅读 · 0 评论 -
flask不运行主函数解决方法
问题:如下代码所示,在pyacharm里用flask框架搭建了一个服务,在主函数中定义了一个全局变量s,但是运行服务后,给服务发送post消息,在test_connection函数中居然不认识这个s变量。最开始以为是变量作用域的问题,但是测试后发现不是。app = Flask("服务")#app = Flask(__name__)@app.route("/extract_keywords"...原创 2019-11-29 10:52:41 · 1381 阅读 · 0 评论 -
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any()
出错原因:将一个值与多个值或一个列表中的值相比较、匹配修改前:if df["content"] == "": print("1")修改后:if df["content"].all() == "": print("1")参考:ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a....原创 2019-11-25 15:41:45 · 298 阅读 · 0 评论 -
AttributeError: 'numpy.int64' object has no attribute 'translate'
在用pymysql将dataframe数据逐行写入数据库时,报AttributeError: ‘numpy.int64’ object has no attribute 'translate’这个错误。报错原因:将dataframe该行中是数值型数据的字段的类型打印出来,发现该字段是numpy.int64类型,但是在数据库中对应要写入的字段是int型的。解决方法:在该行中numpy.int64...原创 2019-11-21 13:50:44 · 8854 阅读 · 0 评论 -
ValueError: Length of values does not match length of index
问题描述:用多元线性回归模型预测出结果后,返回给主函数处理,报“ValueError: Length of values does not match length of index”错误。经过多方调试,发现是返回值类型的匹配问题。描述如下:result = LR_reg.predict(scaler_test_data)return result # type(result)...原创 2019-09-14 18:49:10 · 31931 阅读 · 0 评论 -
LinAlgError: SVD did not converge
问题描述:预测最小值时:pmax: 8qmax: 8求出来的BIC 最小的p值 和 q 值居然为: 27和0,比最大pmax还大!而且报“LinAlgError: SVD did not converge”的错误。解决方法:1、网上查找相关资料,说可能是空值问题,排除通用性的问题。于是尝试从自己代码中的问题着手解决问题。2、逐步调试,打印出bic_matrix的值,发现居然不是88的...原创 2019-09-14 09:59:53 · 7010 阅读 · 2 评论 -
TypeError: float() argument must be a string or a number, not 'datetime.date'
问题描述:在做决策回归树时,报如题所示错误.解决方法:构造的数据集里包含日期类型的数据,将日期类型数据转化成字符串或者数值型数据即可。...原创 2019-09-29 10:18:50 · 6800 阅读 · 0 评论 -
TypeError: 'list' object is not callable
问题描述:有如下代码:list = [1,2,3]list = list(df.columns[df.isnull().sum() > 0]) #df.columns[df.isnull().sum() > 0]是Index类型,返回df中所有有空值的列的index,list()函数将后面的Index转换为列表类型在运行上述代码时,报错:TypeError: ‘list’ ...原创 2019-09-26 16:56:05 · 731 阅读 · 0 评论