Category Archives: Error

How to Fix “Microsoft Visual C ++ 14.0 is required” Error

Error message:

error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build 		Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools

Solution

# Open the link to download the whl file for the corresponding version of twisted The version I downloaded is Twisted-17.9.0-cp36-cp36m-win_amd64.whl (cp followed by python version, amd64 stands for 64-bit)
http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted  

# After downloading, execute the following command. 
python -m pip install E:\Twisted-17.9.0-cp36-cp36m-win_amd64.whl 

# Run with the following error. 
Twisted-17.9.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.

# After changing to another version of Twisted-17.9.0-cp36-cp36m-win32.whl, execute the following command. 
python -m pip install E:\Twisted-17.9.0-cp36-cp36m-win32.whl 

# After executing the previous command, the following message indicates that Twisted is successfully installed 
Successfully installed Twisted-17.9.0 

# Then execute the following command.
python -m pip install scrapy 

This time, it can be installed successfully

MyBatis: Mapped Statements collection does not contain value for xxx

Complete error message:

Nov 03, 2015 10:01:08 AM org.apache.catalina.core.StandardWrapperValve invoke
Warming: Servlet.service() for servlet [springmvc] in context with path [/xinghe-platform-web] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for ResScore.getByResourceLocalIds
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for ResScore.getByResourceLocalIds] with root cause
java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for ResScore.getByResourceLocalIds
    at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:797)
    at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:631)
    at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:624)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
    at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
    at com.sun.proxy.$Proxy17.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)
    at com.xinghe.platform.dao.ResScoreDao.getByResourceLocalId(ResScoreDao.java:43)
    at com.xinghe.platform.service.ResScoreManager.getByResourceLocalId(ResScoreManager.java:41)
    at com.xinghe.platform.service.ResScoreManager$$FastClassBySpringCGLIB$$68ba2513.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
    at com.xinghe.platform.service.ResScoreManager$$EnhancerBySpringCGLIB$$8cc6352f.getByResourceLocalId(<generated>)
    at com.xinghe.platform.action.ResResourcePublic.getScore(ResResourcePublic.java:433)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:177)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.auth.filter.AuthorizationFilter.doFilterInternal(AuthorizationFilter.java:77)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.auth.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:115)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.xinghe.activate.filter.ActivateFilter.doFilterInternal(ActivateFilter.java:52)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)

Environment: Java project, spring MVC + mybatis framework,
source code location of this error:
when you see mybatis SystemException, you first think that the error may occur in ResScoreMapper.xml File, but Dao layer is directly related to Mapper.xml If you view the error information, you can see the following information: com.xinghe.platform . dao.ResScoreDao.getByResourceLocalId ( ResScoreDao.java:43 )
the mistake I encountered happened here!
error reason:
said the cause of the error, here made a mistake in pediatrics, copied the code from other Dao files, changed the name of the method, and changed the command space and method name in the Mapper that was invoked in selectOne, resulting in this error;
Mapped Statements collection does not does ResScore.getByResourceLocalIds
This is because the map getbyresourcelocalids cannot be found in mapper.

Type error: must use keyword argument for key function

The reason may be the version problem of Python 2 and 3
chestnut 1: call sorted() and pass in reversed()_ CMP can achieve reverse order sorting

def reversed_cmp(x, y):
    if x > y:
        return 1
    if x < y:
        return -1
    return 0

L1 = [16, 5, 120, 9, 66]
print(sorted(L1, reversed_cmp))

terms of settlement:

L1 = [16, 5, 120, 9, 66]
print(sorted(L1, reverse=True))

The results were as follows

[120, 66, 16, 9, 5]

Maybe it’s too simple. Python doesn’t bother to use custom functions…
in continuous update...

Chestnut 2: using sorted() higher-order function to realize the algorithm of ignoring case sorting

def cmp_ignore_case(s1, s2):
    if s1[0].lower() > s2[0].lower():
        return -1
    if s1[0].lower() < s2[0].lower():
        return 1
    return 0

print(sorted(['haha', 'about', 'TIM', 'Credit'], cmp_ignore_case))

terms of settlement:

def com_flag(s):
    return s.lower()
# key represents the key function, the default is None, reverse represents whether to reverse the order, the default is False
# The following functions are arranged in reverse order
print(sorted(['haha', 'about', 'TIM', 'Credit'], key=com_flag, reverse=True))

The results were as follows

['Zoo', 'Credit', 'bob', 'about']

come on.

[How to Fix] Spring boot startup error: could not resolve placeholder

When starting the whole spring boot project, an error occurred:
could not resolve placeholder

Reason: the configuration file is not specified, because there are multiple configuration files under Src/main/resources, such as application- dev.properties , boss.properties And so on.

Solution:
method 1:
in application.properties Join in

spring.profiles.active= @env@

Used to automatically decide which profile to choose.

Method 2: (not a good method)

@Configuration
@EnableTransactionManagement
// Added by yourself, specifying the configuration file
@PropertySource(value = "classpath:application-dev.properties", ignoreResourceNotFound = true)
public class DruidDBConfig {

    private static final Logger LOG = LoggerFactory.getLogger(DruidDBConfig.class);

    @Value("${spring.datasource.url}")
    private String dbUrl;

    @Value("${spring.datasource.username}")
    private String username;
    。。。
}

VUE: Property or method “deleteFun“ is not defined on the instance but referenced during render. [How to Fix]

A few days ago, I found a giant cow’s AI learning website, which is easy to understand, funny and humorous. I can’t help sharing it with you. Click to jump to the tutorial.

1. A click event reports an error:

Property or method "deleteFun" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property

2. Error reason: this method is undefined. I thought it was written in methods, but it’s not. My original writing:

3. Solution: correct the location code in the red box.

That’s it.

feign.FeignException: status 404 reading XXXClient#XXMethod(String)

In a feign call, there is a requirement to query the order according to the order number. The interface is as follows:

@FeignClient(name = "order", path = "/")
public interface OrderFeignService {
	
	@GetMapping(value = "/order/{orderNumber}")
	BizOrderModel checkBizOrderExist(@PathVariable("orderNumber") String orderNumber);
}

The implementation is as follows:

@RestController
@RequestMapping("/")
public class OrderController implements OrderFeignService {	
    @Override
	@GetMapping(value = "/order/{orderNumber}")
	public BizOrderModel checkBizOrderExist(@PathVariable("orderNumber") String orderNumber) {
		return orderService.findByOrderNumber(orderNumber);
	}
}

The call is as follows:

@Service
@Slf4j
public class OrderService {

    @Autowired
    OrderFeignService orderFeignService;

    public void test(){
		if (null == orderFeignService.checkBizOrderExist(dto.getOrderNumber())) {
			LOG.ERROR("Order information does not exist");
		}
}

The exception message is as follows.
feign.FeignException: status 404 reading XXXXClient#XXXXMethod(Long)
at feign.FeignException.errorStatus(FeignException.java:62)
at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:91)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
at com.sun.proxy.$Proxy97.querySpuDetailBySpuId(Unknown Source)
at XXXX(IndexService.java:41)
at XXXX(ElasticsearchTest.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at

Anomaly Exclusion.

That is, when the input of the get request is null, such as the orderNumber in this example is not passed, feign call will report 404!

ubuntu20.04——hdaudioC0D2: unable to bind the codec

The problem
Not long ago, try the dual system, win10+ubuntu20.04, the installation is relatively smooth, can normally enter the system. However, when I updated the graphics driver (proprietary nvidia-drivers-390), I rebooted and couldn’t access the system’s graphical interface, which was stuck on the following page.
The diagram below:

To solve
After that, select ubunru advanced option select l> version of the kernel to boot>ut can enter the graphical interface.
But, it makes me feel bad…
/etc/default/grub

Ctr+Alt+F2

# The original line
# GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
# Modified
GRUB_CMDLINE_LINUX_DEFAULT=""


After editing and saving, update GRUB:

sudo update-grub

After rebooting, you can finally enter the graphical interface.
The appendix
https://forum.ubuntu.com.cn/viewtopic.php?t=490617

Using rpm to install WGet in CentOS 6.5 libc.so .6(GLIBC_ 2.14)(64bit) is needed by wget-1.14-18.el7_6.1.x86_sixty-four

ERROR 1045 (28000): Access denied for user ‘root’@‘192.168.12.114’ (using password: YES)
*Error*
[root@node01 ~]# rpm -ivh wget-1.14-18.el7_6.1.x86_64. rpm
warning: wget-1.14-18.el7_6.1.x86_64. rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
libc.so.6(GLIBC_2.14)(64bit) is needed by wget-1.14-18.el7_6.1. x86_64
libc.so.6(GLIBC_2.15)(64bit) is needed by wget-1.14-18.el7_6.1. x86_64
libc.so.6(GLIBC_2.17)(64bit) is needed by wget-1.14-18.el7_6.1. x86_64
libpcre.so.1()(64bit) is needed by wget-1.14-18.el7_6.1.x86_64
Case
wget-1.14-18.el7_6.1.x86_64. rpm The version is too high.
How to Fix
Go to http://rpm.pbone.net/resultsb_dist_79_size_492960_name_wget-1.12-1.4.el6.x86_64.rpm.html and download wget-1.12-1.4.el6.x86_64.rpm here, worked!

Flutter Xcode Module not found or LibreSSL SSL_connect: SSL_ERROR_SYSCALL

Xcode appears in the Flutter project

The Module ‘qr_code_scanner’ not found

or

LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

~/. GitConfig file
can be edited to modify or add proxies, requiring local hanging ladder

[http]
    sslBackend = openssl
    proxy = socks5://127.0.0.1:7890