疑难杂症解决
DBzs
Hello World >> Change World >> Create World
展开
-
failed type inference due to: non-precise type pyobject
Compilation is falling back to object mode WITHOUT looplifting enabled because Function "***" failed type inference due to: non-precise type pyobject原创 2021-12-17 19:59:55 · 737 阅读 · 0 评论 -
numpy下标 IndexError: index 10 is out of bounds for axis 0 with size 10
在写python程序遇到了这个问题,特别注意区分:下标从0还是从1开始,直到n-1还是n结束!原创 2021-12-16 23:22:52 · 4532 阅读 · 0 评论 -
TypeError: ‘module‘ object is not callable
注意调用的是函数还是模块,例如python程序:from sympy import *from scipy import integrate...print(integrate(y, x, (x, -1, 1)))...则就会报错,修改为:from sympy import *...print(integrate(y, x, (x, -1, 1)))...即可。...原创 2021-12-16 23:18:49 · 708 阅读 · 0 评论 -
IndentationError: unindent does not match any outer indentation level
注意区分制表符和空格,可参考:sublime text 显示空格和制表符原创 2021-12-16 23:15:27 · 193 阅读 · 0 评论 -
sublime text 显示空格和制表符
sublime text 显示空格和制表符原创 2021-12-16 23:13:05 · 1771 阅读 · 0 评论 -
error: (-215:Assertion failed) mv[i].size == mv[0].size && mv[i].depth() == depth in function ‘merge
cv2.error: OpenCV(4.5.4) /tmp/pip-req-build-w88qv8vs/opencv/modules/core/src/merge.dispatch.cpp:129: error: (-215:Assertion failed) mv[i].size == mv[0].size && mv[i].depth() == depth in function 'merge'原创 2021-12-11 17:38:50 · 6408 阅读 · 0 评论 -
error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘imshow‘
cv2.error: OpenCV(4.5.4) /tmp/pip-req-build-w88qv8vs/opencv/modules/highgui/src/window.cpp:1006: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'原创 2021-12-11 17:08:35 · 3587 阅读 · 0 评论 -
Cannot find a compatible Vulkan driver (ICD). Please look at the Getting Started guide for additiona
Cannot find a compatible Vulkan driver (ICD). Please look at the Getting Started guide for additional information.原创 2021-12-05 22:43:44 · 5201 阅读 · 1 评论 -
NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver. Make sure that the lat
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.原创 2021-12-05 22:36:31 · 1746 阅读 · 3 评论 -
the initramfs will attempt to resume from /dev/sdb2, Set the RESUME variable to override this
the initramfs will attempt to resume from /dev/sdb2, Set the RESUME variable to override this原创 2021-12-05 22:29:55 · 1937 阅读 · 0 评论 -
Possible missing firmware /lib/firmware/rtl_nic/rtl8168fp-3.fw for module r8169
Possible missing firmware /lib/firmware/rtl_nic/rtl8168fp-3.fw for module r8169原创 2021-12-05 22:25:35 · 1067 阅读 · 1 评论 -
ModuleNotFoundError: No module named ‘pygame‘
遇到问题:解决办法:pip3 install pygameORpip install pygame安装成功!原创 2021-11-21 12:47:51 · 3160 阅读 · 0 评论 -
visdom启动Downloading scripts, this may take a little while卡住
在使用python -m visdom.server时,遇到Downloading scripts, this may take a little while,然后就长时间没动静,可以用以下方法解决:首先下载需要的文件:https://github.com/kuweicai/document-sharing或https://codechina.csdn.net/mirrors/kuweicai/document-sharing/-/tree/master然后将下载的文件解压,替换掉visdom模块里原创 2021-08-06 18:30:19 · 986 阅读 · 0 评论 -
ModuleNotFoundError: No module named ‘jsonpatch‘
缺少jsonpatch模块,使用conda安装:conda install jsonpatch -y即可。原创 2021-05-27 21:37:42 · 2292 阅读 · 0 评论 -
RuntimeError: CUDNN_STATUS_EXECUTION_FAILED
禁用就好了,简单省事。torch.backends.cudnn.enabled = False原创 2021-05-13 20:33:15 · 291 阅读 · 1 评论 -
RuntimeError: CuDNN error: CUDNN_STATUS_SUCCESS
遇到此问题,说明使用的cuda或cudnn版本过低,去官网https://pytorch.org/get-started/locally/更新即可解决。原创 2021-05-12 22:41:26 · 855 阅读 · 0 评论 -
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated
解决办法,在文件中搜索调用yarm的地方,在后面添加Loader=yaml.FullLoader即可原创 2021-05-12 16:43:16 · 323 阅读 · 0 评论 -
想安装cuda90版本的pytorch,但conda安装的是cuda80版本的pytorch
在使用conda安装pytorch时,根据官网说明,输入:conda install pytorch=0.4.1 torchvision cuda90 -c pytorch但是却弹出提示:Collecting package metadata (current_repodata.json): doneSolving environment: done## Package Plan ## environment location: C:\Users\flyintoskyq\anacond原创 2021-05-12 16:37:02 · 682 阅读 · 0 评论 -
解决wget报错ERROR: The certificate of ‘xxxxx’ is not trusted
报错写法:wget -c http://xxxxxxxxx.pth解决办法:在wget指令后添加--no-check-certificatewget -c http://xxxxxxxxx.pth --no-check-certificate原创 2021-05-12 15:45:21 · 6781 阅读 · 0 评论 -
解决Visual Studio工具栏Tools下面没有错误查找
首先点击工具Tools >> 外部工具External Tools选择Command为errlook.exe(一般在安装路径下C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools)点击应用Apply、确定OK,即可原创 2021-04-07 16:44:17 · 422 阅读 · 0 评论 -
C++ LPCTSTR使用注意事项
直接使用LPCTSTR("hello world")是不对的,应该写成LPCTSTR(CString("hello world"))原创 2021-03-28 21:20:02 · 441 阅读 · 0 评论 -
C++ Error LNK2005 “public: xxxxx already defined in xxxxxx.obj
在编译C++项目时遇到这样报错:Severity Code Description Project File Line Suppression StateError LNK2005 "public: int __thiscall CClientHttp::cchttpSend(wchar_t const *,unsigned short,void *,unsigned long)" (?cchttpSend@CClientHttp@@QAEHPB_WGPAXK@Z) already defined in原创 2021-03-28 20:14:15 · 671 阅读 · 1 评论 -
You don‘t have permission to access this resource.
访问自己的搭建的网站时apache报错You don’t have permission to access this resource.解决办法:修改httpd.conf或者httpd-vhosts.conf(因人而异)中Require后面为all granted,然后重启apache即可。原创 2021-03-27 19:39:20 · 24760 阅读 · 1 评论 -
vs cannot run when setup is in progress
打开Visual Studio时遇到报错cannot run when setup is in progress解决办法:什么都不用做,静候少许,重试即可。原创 2021-03-27 12:15:48 · 833 阅读 · 1 评论 -
由于找不到msvcr110.dll,无法继续执行代码
下载地址直达链接:32位.dll下载64位.dll下载遇到问题:访问https://www.dll-files.com/搜索msvcr110.dll点进结果选择合适的版本下载等待下载然后将下载好的.dll文件放入文件夹C:\Windows\System32然后打开运行(Win+R),输入regsvr32 msvcr110.dll,确定其余类似问题同样方法解决。...原创 2021-03-26 17:43:46 · 1355 阅读 · 0 评论 -
C4996 ‘gethostbyname‘: Use getaddrinfo() or GetAddrInfoW() instead of define _WINSOCK_DEPRECATED_NO_
遇到此类报错,直接在改文件顶部添加屏蔽代码即可:#pragma warning(disable: 4996)参考原创 2021-03-25 10:39:14 · 3562 阅读 · 0 评论 -
vs加载符号太慢
vs加载符号太慢:解决办法:取消勾选并清空缓存:然后重启vs即可。原创 2021-03-24 09:47:05 · 791 阅读 · 0 评论 -
新建mfc工程后打开图形化设计界面
新建mfc工程后只有代码,怎么打开图像化设计界面呢?首先双击.rc文件:然后双击:即可。原创 2021-03-23 21:11:13 · 729 阅读 · 0 评论 -
vs新建mfc工程找不到
在vs新建mfc工程时发现找不到,那么就点击右下方的“安装更多”然后勾选:然后下载安装即可。原创 2021-03-23 21:01:24 · 509 阅读 · 0 评论 -
回调函数中this失效
解决办法:在回调前var that = this;在回调中用that.即可。原创 2021-03-22 20:33:24 · 457 阅读 · 0 评论 -
Failed to execute ‘readAsBinaryString‘ on ‘FileReader‘: parameter 1 is not of type ‘Blob‘.“
element-ui上传文件时的file经过了包装:所以使用的时候要用file.rawp.s 根据不同情况,“raw”可能为其他名称,以此类推即可。原创 2021-03-22 17:03:50 · 7224 阅读 · 3 评论 -
windows远程桌面登录不允许空密码
windows远程桌面登录不允许空密码怎么解决:1、设置用户的登录密码(比较麻烦)2、允许空密码登录(推荐)首先Win+R打开运行,输入gpedit.msc然后修改:即可。原创 2021-03-22 16:41:20 · 4184 阅读 · 0 评论 -
package wine-4.0.4-1.el8.x86_64 requires wine-core(x86-64) = 4.0.4-1.el8, but none of the providers
在centos上安装wine时遇到报错:yum install wineRepository epel is listed more than once in the configurationLast metadata expiration check: 0:15:13 ago on Sun 21 Mar 2021 05:05:10 PM CST.Error: Problem: package wine-4.0.4-1.el8.x86_64 requires wine-core(x86-64)原创 2021-03-21 19:57:18 · 1645 阅读 · 0 评论 -
Unknown repo: ‘PowerTools‘
首先:yum install -y dnf-plugins-core然后:yum config-manager --set-enabled powertools或PowerTools原创 2021-03-21 19:47:47 · 2839 阅读 · 3 评论 -
electron项目的cookies存放在哪里
存放在这里C:\Users\你的用户名\AppData\Local\Programs\你的electron项目名原创 2021-03-21 16:49:47 · 1279 阅读 · 0 评论 -
Elements in iteration expect to have ‘v-bind:key‘ directives
报错写法:<div v-for="item in list">{{item}}</div>修改为:<div v-for="item in list" v-bind:key="item">{{item}}</div>原创 2021-03-20 19:08:54 · 59 阅读 · 0 评论 -
Can‘t resolve ‘xterm/lib/addons/fit/fit‘
electron项目中遇到这个问题说明xterm版本不对,可以更改package.json中xterm的版本号:"xterm": "3.9.0"然后删除node_modules,重新yarn或npm install原创 2021-03-20 19:03:11 · 453 阅读 · 0 评论 -
github无法访问解决办法
遇到github无法访问时怎么办?可能是ip变了,可以通过刷新dns解决:打开cmd,输入ipconfig /flushdns:C:\Users\Admin>ipconfig /flushdnsWindows IP ConfigurationSuccessfully flushed the DNS Resolver Cache.特别注意不要通过历史记录进入github官网然后搜索github官网:点击进入即可:...原创 2021-03-19 18:46:59 · 4869 阅读 · 1 评论 -
electron-vue项目element-ui限制上传文件的类型及大小
在el-upload标签中添加:before-upload="beforeUpload"在methods中添加方法beforeUploadbeforeUpload(file) { var testfile = file.name.substring(file.name.lastIndexOf('.') + 1); const type = (testfile === 'zip') || (testfile === 'rar'); // 限制文件类型 const原创 2021-03-16 20:51:29 · 540 阅读 · 0 评论 -
Error: Unresolved node modules: vue
在用electron-vue打包时遇到Error: Unresolved node modules: vue问题,解决方案:1、删除node_modules文件夹2、yarn或npm install重新安装3、yarn build或npm run build即可原创 2021-03-16 20:36:55 · 2075 阅读 · 0 评论