![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
debug
_冷山_
import torch as tf
展开
-
java.lang.UnsupportedOperationException解决方法
项目中我需要一个ArrayList数组存放多个实体类对象,其中2个实体类对象是初始化时就需要存进去,另外的需要从另一个List循环提取数据存放,为了编码简洁使用了Arrays.asList()List<CustomerInfoDto> customerInfoDtos = Arrays.asList(bbrCustomerInfoDto, tbrCustomerInfoDto);但之后使用add添加实体类元素时出现了以下报错java.lang.UnsupportedOperationE原创 2022-03-29 11:22:11 · 1187 阅读 · 0 评论 -
publish.vue?02fe:77 Uncaught (in promise) TypeError: _api_edu_course__WEBPACK_IMPORTED_MODULE_0__.de
前端Vue点击事件后没反应,数据库数据未更新,后端未报错,然后发现控制台报错如下:Uncaught (in promise) TypeError:api_edu_course__WEBPACK_IMPORTED_MODULE_0_.default.publishCourse is not a functionat publish.vue?02fe:77 (anonymous) @ publish.vue?02fe:77解决方案:点进报错代码片段后:发现是调用的函数名和定义的函数名不一原创 2021-04-15 20:05:59 · 1248 阅读 · 0 评论 -
Invalid bound statement (not found): com.lu.tech.eduservice.mapper.EduCourseMapper.queryById
baseMapper中没有queryById()方法,使用selectById()。原创 2021-04-13 17:16:51 · 168 阅读 · 0 评论 -
【tensorflow】【python】Tensor Check Solution
2020年2月12日 0次阅读 共721个字 0条评论 0人点赞 QueenDekimZTensor Check#################This code used to check msg of Tensor stored in ckpt#work well with tensorflow version of ‘v1.3.0-rc2-20-g0787eee’################import osfrom tensorflow.python import pywra原创 2021-02-28 00:12:31 · 202 阅读 · 1 评论 -
【人脸识别】【python】Object arrays cannot be loaded when allow_pickle=False解决方案
2020年2月11日 0次阅读 共1625个字 0条评论 0人点赞 QueenDekimZmtcnn debug用mtcnn对LFW人脸数据集进行人脸检测与关键点对齐,并裁剪到160*160维,为后续facenet训练作training set。python src/align/align_dataset_mtcnn.py lfw lfw_160 --image_size 160–margin 32 --random_order --gpu_memory_fraction 0.25报错:原创 2021-02-27 21:37:11 · 377 阅读 · 0 评论 -
【python】Something is wrong with the numpy installation
2020年2月5日 0次阅读 共448个字 0条评论 0人点赞 QueenDekimZCOCO-APIwindows下安装COCO API时python setup.py build_ext install出现报错:ImportError: Something is wrong with the numpy installation. Whileimporting we detected an older version of numpy in[‘F:\Coding_Tools\py原创 2021-02-27 20:38:55 · 259 阅读 · 0 评论 -
【tensorflow】AttributeError: module ‘tensorflow._api.v1.compat‘ has no attribute ‘v2‘
2020年2月4日 0次阅读 共391个字 0条评论 0人点赞 QueenDekimZtensorflow.slimpython object_detection/builders/model_builder_test.py出现报错:将代码def global_pool(input_tensor, pool_op=tf.compat.v2.nn.avg_pool2d):改为如下def global_pool(input_tensor, pool_op=tf.nn.avg_pool原创 2021-02-27 20:34:15 · 5072 阅读 · 0 评论 -
【tensorflow】AttributeError: module ‘tensorflow._api.v1.compat‘ has no attribute ‘v1‘
2020年2月4日 0次阅读 共232个字 0条评论 0人点赞 QueenDekimZtensorflow.slimpython object_detection/builders/model_builder_test.py出现报错:将代码batch_norm_updates_collections=tf.compat.v1.GraphKeys.UPDATE_OPS,改为如下batch_norm_updates_collections=tf.GraphKeys.UPDATE_OPS原创 2021-02-27 20:28:06 · 1190 阅读 · 0 评论 -
【Pytorch】import torch报错from torch._C import *
好久不用的conda环境torch_env下导入torch报错:import torch Traceback (most recent call last): File “”,line 1, in File“F:\Coding_Tools\Anaconda\envs\torch_env\lib\site-packages\torch_init_.py”,line 81, in from torch._C import * ImportError:numpy.core.multiarray f原创 2020-09-09 23:13:07 · 5112 阅读 · 0 评论 -
Centos7 firewall-cmd 命令报错 ModuleNotFoundError: No module named ‘gi‘
安装了python3的解释器并设置新默认路径后,python是指向python3的,而原来的系统firewall-cmd 是命令脚本是使用python2的,而python3没有对应包,需要修改firewall-cmd命令脚本,让它依旧使用python2,这样就不会有问题了。进入root权限模式sudo su root用vim编辑firewall-cmd命令脚本文件vim /usr/bin/firewall-cmd修改第一行python为python2,ESC + :wq 保存退出。如果.原创 2020-09-07 11:51:57 · 1093 阅读 · 0 评论 -
ModuleNotFoundError: No module named ‘imagekit.models‘
from django.dbimport modelsfrom django.contrib.auth.modelsimport AbstractUserfrom imagekit.modelsimport ProcessedImageFieldfrom imagekit.processorsimport ResizeToFillmigrate数据到数据库时遇到的错误。这个问题可能是安装了Imagekit而不是Django-Imagekit。先卸载imagekit库再安装django-imag.原创 2020-09-07 13:28:17 · 448 阅读 · 0 评论 -
ImportError: PILKit was unable to import the Python Imaging Library.
migrate数据到数据库时遇到的错误。ImportError: PILKit was unable to import the Python Imaging Library. Please confirm it`s installed and available on your current Python path.安装pillow库pip install pillow发布于:2019年11月15日 @ 23:11 ailulu.tech...原创 2020-09-07 13:31:11 · 654 阅读 · 0 评论 -
MySQLdb._exceptions.OperationalError: (1045, “Access denied for user ‘root‘@‘localhost‘ (using passw
migrate数据到数据库时遇到的错误。MySQLdb._exceptions.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")解决方案:setting.py文件中DATABASES设置的USER或者PASSWORD错了,修改一下就可以了。发布于:2019年11月15日 @ 23:13 ailulu.tech...原创 2020-09-07 13:37:00 · 3926 阅读 · 0 评论 -
ERRORS: auth.User.groups: (fields.E304) Reverse accessor for ‘User.groups‘ clashes with reverse acce
写博客网站后台,设计数据库结构时,博客(Article)表中定义了一个作者外键。author=models.ForeignKey(settings.AUTH_USER_MODEL,verbose_name=‘作者’)这个外键是网站注册用户,这样用户也可以有发文权限,考虑到以后会扩展用户功能,创建了一个用户app(user),并在models.py编写了个用户模型(Ouser),结果migrate数据到数据库时遇到的以下错误。ERRORS:auth.User.groups: (fields.E304)原创 2020-09-07 13:39:55 · 1421 阅读 · 0 评论 -
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applie
migrate数据到数据库时遇到的以下错误。django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency user.0001_initial on database 'default'.解决方案:删除数据库中 除了auth_user的其他表再migrate。原因可能是因为admin的模型依赖了之前默认的user模原创 2020-09-07 13:44:44 · 466 阅读 · 0 评论 -
Python No module named ‘rest_framework‘
pip install djangorestframework发布于:2019年11月15日 @ 23:28 ailulu.tech原创 2020-09-09 22:59:57 · 1785 阅读 · 1 评论 -
django.template.exceptions.TemplateSyntaxError: ‘comment_tags‘ is not a registered tag library.
Django runserver报错django.template.exceptions.TemplateSyntaxError: ‘comment_tags’ is nota registered tag library. Must be one of:accountadmin_listadmin_modifyadmin_staticadmin_urlsblog_tagscachehumanizei18nl10nlogsocialaccountstaticstaticfi原创 2020-09-09 22:58:58 · 709 阅读 · 1 评论 -
RuntimeError: Model class apps.storm.models.BigCategory doesn‘t declare an explicit app_label and is
Django runserver时报错RuntimeError: Model class apps.storm.models.BigCategory doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS解决方案:使用users.models的导入方式修改前:from .models import Article, BigCategory, Category, Tag修改后:原创 2020-09-09 22:56:41 · 326 阅读 · 0 评论 -
Database returned an invalid datetime value. Are time zone definitions for your database installed?
Django > python manage.py runserver时报错。Database returned an invalid datetime value. Are time zone definitions for your database installed?解决方案:修改settings.py的时区变量。修改前:LANGUAGE_CODE = ‘en-us’TIME_ZONE = ‘UTC’USE_I18N =TrueUSE_L10N =TrueUSE_TZ原创 2020-09-09 22:53:05 · 2627 阅读 · 1 评论 -
NoReverseMatch: Reverse for ‘data‘ not found . ‘data‘ is not a valid view function or pattern
Django > python manage.py runserver时报错。NoReverseMatch: Reverse for 'data' not found . 'data' is not a valid view function or pattern解决方案:忘了写相关的urls.py路由,加上后运行成功。原创 2020-09-09 22:48:52 · 337 阅读 · 1 评论