
bug调试
招坑体质Yoomi~
这个作者很懒,什么都没留下…
展开
-
Vue问题--报错“ TypeError:this.getOptions is not a function ”
出现这个问题的原因:html-loader 的版本过高,不兼容 getOptions 方法,所以需要对 html-loader 进行降级处理;我们需要使用 npm install html-loader@版本号 的方式下载较低版本的html-loader;之前使用的html-loader 版本是 2.1.0,后来修改成了 0.5.5 版本(npm install html-loader@0.5.5 --save-dev),就 OK 了~https://blog.youkuaiyun.com/...原创 2021-06-30 21:33:13 · 1604 阅读 · 0 评论 -
nodejs问题:internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value);
问题描述:安装完nrm后,查看nrm是否安装成功nrm ls报错:internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, 'string', value); ^[TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (i...原创 2021-06-24 14:35:47 · 2268 阅读 · 0 评论 -
Pytorch问题:ModuleNotFoundError: No module named ‘torchnet‘ , ‘pip._internal‘已解决
bug1:ModuleNotFoundError: No module named 'pip._internal'出错提示:File "D:\app\anaconda\envs\pytorch_gpu\Scripts\pip.exe\__main__.py", line 4, in <module>ModuleNotFoundError: No module named 'pip._internal'解决: 找到提示的路径(D:\app\anaconda\env...原创 2021-05-27 18:29:42 · 2697 阅读 · 0 评论 -
image caption 代码遇到的各种坑
总有一些坑,需要填★ python json.dump中文乱码问题 with open(os.path.join(file, 'vocab.json'), 'w') as f: json.dump(vocab, f)修改: with open(os.path.join(file, 'vocab.json'), 'w', encoding='utf-8') as f: json.dump(vocab, f,ensure_ascii=False)原创 2021-05-14 21:32:51 · 325 阅读 · 0 评论 -
Pytorch问题---The size of tensor a (4) must match the size of tensor b (3) at non-singletonThe size of
报错:RuntimeError:The size of tensor a (4) must match the size of tensor b (3) at non-singleton解决:img = Image.open(image_path)改为img = Image.open(image_path).convert('RGB')。完成~原创 2021-02-25 07:41:21 · 9820 阅读 · 5 评论 -
github问题----图片不显示(已解决)
1、打开路径C:\Windows\System32\drivers\etc\hosts 方法:直接在搜索hosts,或者用Everything搜索hosts。(Everything是个文件搜索工具,搜索超快的)2、打开hosts文件,在最后粘贴以下内容# GitHub Start #192.30.253.112 github.com #注意着两个必须注释#192.30.253.119 gist.github.com #必须注释掉,否则gi...原创 2021-01-26 19:45:52 · 168 阅读 · 0 评论 -
BrokenPipeError: [Errno 32] Broken pipe
解决:windows: num_workers=0linux: num_workers>0原创 2021-01-07 21:42:38 · 1416 阅读 · 0 评论 -
pycharm问题---ModuleNotFoundError: No module named ‘pip‘
问题描述:安装opencv-python库的时候,终端提示更新pip,更新完pip以后,突然报错: ModuleNotFoundError: No module named 'pip'解决方案:windows: python -m ensurepip python -m pip install --upgrade piplinux: sudo apt install --fix-missing python3-pip已...原创 2021-01-07 21:36:07 · 1556 阅读 · 0 评论 -
tensorflow问题--KeyError: ‘accuracy’ 和RuntimeError: __iter__() is only supported inside of tf.function
问题描述:在运行霹雳吧啦Wz老师用tensorflow实现的Alexnet代码时,出现下面的错误:train_accuracy = history_dict["accuracy"]KeyError: ‘accuracy’原因分析:由于keras库版本不同所造成的解决方案:将参数accuracy替换为acc,将参数val_accuracy改为val_acc已解决~参考链接:https://blog.youkuaiyun.com/weixin_42497252/article/det..原创 2021-01-05 22:45:46 · 2174 阅读 · 2 评论 -
tensorflow问题--Could not load dynamic library:‘____.dll‘
问题描述:Could not load dynamic library 'cudart64_100.dll'Could not load dynamic library 'cublas64_100.dll'……一系列问题可归纳为:Could not load dynamic library:'____.dll'原因分析:我的电脑tensorflow版本为:15.0cuda版本为:10.1tensorflow版本与cuda版本不匹配当Tensorflow的版本>.原创 2020-12-18 22:40:39 · 1360 阅读 · 1 评论 -
TypeError: translate() takes exactly one argument (2 given)
报错: TypeError: translate() takes exactly one argument (2 given)存错代码:tokens = str( caption ).lower().translate( None, string.punctuation ).strip().split()原因:python版本python2下该语句正常执行。python3中translate的参数只有一个。修改:trans=str.maketrans({key: None f...原创 2020-12-05 00:24:26 · 903 阅读 · 1 评论