余生无Bug

it2025-01-31  39

个人Bug记录,不定时更新

日期(Ctrl+;)项目语言错误详情处理方法2020/9/29linuxlinuxE: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?sudo rm /var/cache/apt/archives/lock;sudo rm /var/lib/dpkg/lock;sudo rm /var/lib/dpkg/lock-frontend2020/9/29安装python-opencvpython错误 ModuleNotFoundError: No module named 'skbuild'1,安装cmakesudo apt install cmake2,pip3 install scikit-build2020/10/10pythonNameError: name '__file__' is not definedimport os ,__file__加上单引号或者双引号2020/10/10pythonSyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xba in positio编码问题,非UTF-82020/10/10pythonView function mapping is overwriting an existing endpoint function: audioflask函数命名冲突2020/10/15androidjavaERROR: This version of Android Studio cannot open this project, please retry with Android Studio 3.6 or newer.配置的Gradle的版本太高了,降级即可打开:build.gradle修改版本2020/10/21python训练模型python训练VOC数据集出现:Too many indices for array。一开始以为标签框越界,或者标注错误,检查并修改XML文件,将越界数据修正。(无效)调试boxes遇到0时出现错误,推断有图片里并没有标注框,导致XML文件没有标注内容,boxes输出为0。通过批量检查将没有标注框的XML文件与图片一并删除,再重新生成数据进行训练。(解决)2020/10/27安装torchpythonERROR: torch-1.5.1+cpu-cp38-cp38-linux_x86_64.whl is not a supported wheel on this platform.torch所需python版本与当前使用python版本不兼容,查看自己python版本下载对应包2020/10/27运行torch模型pythontorch.load with map_location=torch.device(“cpu”) to map your storages to the CPUtorch.load('')添加一个参数torch.load('',map_location='cpu'),所有CUDA改为False2020/10/27pyinstall编译pythonAttributeError: module 'win32ctypes.pywin32.win32api' has no attribute 'error'应用图标不正确,需要正确的ico图标2020/10/29安卓项目javajava.lang.UnsatisfiedLinkError: dlopen failed: library "libomp.so" not found,应用闪退,停止运行可能ndk版本不同,关联openmp库,需要在c++编译的cmakeList上target_link_libraries中加入-static-openmpndk版本不同导致的异常,导致底层库链接异常,2020/11/1c++跑NCNN模型c/c++fatal error LNK1120:error LNK2001: 无法解析的外部符号 "public: int __cdecl UltraFace::detect()定义一个类的头文件.h,在.cpp中实现类的函数实现,然后跨文件调用该.h文件,VS2019发生链接错误,将.cpp的实现函数移到.h文件下解决问题,暂时不了解啥原因。2020/11/3android studiojava顶部栏出现“No IDEA annotations attached to the JDK 1.8, some issues will not be found”的警告可能原因:android studio发癫了,清除缓存1.关闭Android Studio2.前往 “C:\Users\UserName\.android”目录,删除“build-cache” 3.前往“C:\Users\UserName\.AndroidStudio3.2\system”目录,删除以下目录“caches” “compiler”“compile-server”“conversion”“external_build_system”“frameworks”“gradle”“resource_folder_cache”4.再次打开AndroidStudio2020/11/11android studiojavaInstallation did not succeed.The application could not be installed.List of apks:[0] '.......1.apk'Installation failed due to: 'device offline'apk安装时突然停掉,或者使用wifi链接安装时没连接wifi导致的,检查电脑是否链接设备wifi,或者清理一下再重新运行。build-》clean project2020/11/12opencv 保存视频c/c++opencv 保存视频后播放保存的视频发现比原视频播放速度快查看保存的帧率,查看原始视频的帧率,将保存视频的帧率设置跟原始视频一样,过大过小都会导致视频播放速度过快或者过慢。2020/11/13人脸识别pythonAttributeError:module 'scipy.misc' has no attribute 'imread'AttributeError: module 'scipy.misc' has no attribute 'imresize'调试一个老项目使用scipy时遇到版本问题,我安装的版本1.3.0已经移除imresize和imread,快捷的办法就是降低版本,降为1.2.0,或者使用import imageioimg = imageio.imreadnumpy.array(Image.fromarray(arr).resize())替换。2020/11/24c++跑NCNN模型c/c++OpenCV4.4 调用cvtColor函数报错:CV_BGR2GRAY未声明的标识符添加头文件#include "opencv2/imgproc/imgproc.hpp"#include "opencv2/imgproc/types_c.h"2020/11/26安卓项目javaA/libc: Fatal signal 6 (SIGABRT), code -6 in tid 9269安卓运行线程崩溃,暂未找到原因,可能资源有问题,注释掉c++接口中的每帧保存为图片后没出现此问题。2020/12/3pyinstaller打包pythonUnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 159: invalid continuation byte命令行中先输入chcp 65001 然后再输入打包命令。 pyinstaller -F xxx.py可能中文注释问题。2020/12/11vs调c++项目c/c++fatal error C1071: 在注释中遇到意外的文件结束 1>utils.cpp中文注释的问题,在使用/* 中文注释 */进行中文注释时,中文前后没有加空格,由于编乱码的问题,导致了错误。解决:中文注释前后加空格。2020/12/11vs调c++项目c/c++: error C4996: 'fopen': This function or variable may be unsafe. Consider us函数不安全,替换使用,这里不替换,直接无视错误。解决办法:项目----》 XX属性 ----》C++  --->预处理器 ---》在预处理器定义添加“_CRT_SECURE_NO_WARNINGS”2020/12/28vs调c++,opencv,ncnn项目c/c++abort() has been called编译成功运行时弹出了错误提示框“abort() has been called”一开始用的是DEBUG版本出现这个问题,配置RELEASE版本编译运行未出现该问题,暂不知道原因2020/12/28python调试Fakerpythondecimal.Decimal' object is not subscriptable想直接调用Decimal切片,发现需要先转为字符串直接str(Decimal)2020/12/29python操作sqlite3python插入了一个数据为"001",数据类型为varchar(12),发现使用SQL语句无论如何都删不掉,比如:DELETE FROM TABLE WHERE NUMBER = '001',没有任何效果,测试发现‘101’又可以删除。。。暂未解决,未找到原因!!
最新回复(0)