Tag Archives: development language

After matlab2018a is successfully installed, a licensing error appears when it is opened: – 8523

Article catalog

1. Problem description 2. Problem solving

1. Problem description

After matlab 2018a is successfully installed, a licensing error appears when it is opened: – 8523:

2. Problem solving

Delete the shortcut of MATLAB automatically created on the desktop, find .../bin/win64/matlab.exe , and then right-click 'to run' as an administrator, otherwise an error will be reported. Right click this file and send the shortcut to the desktop, so that the desktop can open MATLAB.

Manifest merger failed with multiple errors, see logs [How to Solve]

Today, when accessing an Android SDK, I reported a problem of manifest merge failed with multiple errors, see logs. Google said that this problem often occurs when introducing a third-party SDK. In fact, it is a dependency conflict
you can see the specific error information above the error, as shown below

it indicates that there is a com.tencent.mid conflict. Just exclude

Qt Failed opening project “xxx“: No plugin can open project type “text/plain“

After going out for a while, QT couldn’t open the project when he came back, so Baidu took it
it turns out that the plug-in is not enabled, so just check it
the top menu bar – help – about plug-ins
check QBs, qmake and support for project construction

Restart QT creator and try to build again. It is successful.

How to solve the [error 11004] getaddrinfo failed error in nltk downloader

Recently, I used nltk as a downloader in my homework related to automatic Q & A. I used another computer to solve the problem, but I didn’t record the solution. I immediately forgot and spent about 2 hours looking for a solution. Therefore, I want to record the solution now.

import nltk

nltk.download('stopwords')
nltk.download('reuters')
nltk.download('punkt')

When executing the above code, an error is found error loading stopwords: & lt; Urlopen error [errno 11004] getaddrinfo failed , the following methods are available through practical operation.

Find the hosts file under C: \ windows \ system32 \ drivers \ etc , open it as an administrator, and add the following line of IP address to the end of hosts.

185.199.108.133 raw.githubusercontent.com

As shown in the figure below,
after adding and running again, you will find that the download is successful

The address of raw.github is changed frequently, resulting in unsuccessful download

It is possible that the address may be changed frequently, resulting in unsuccessful downloading. We can open the website for querying the IP address: https://www.ipaddress.com/ Enter raw. Githubusercontent. Com to find the corresponding new IP address.

give an example

We have added the IP address to the hosts and found that it was still unsuccessful. Therefore, let’s see if the download failed due to the change of the IP address of raw.github. We open https://websites.ipaddress.com/ website, enter raw.githubusercontent.com , and click look up
. It is found that four IPS have been found. We replace the content in hosts with

185.199.109.133 raw.githubusercontent.com

Then we re execute and find success.

If the above solutions are not solved, you can leave a message and we can communicate together~

The above solutions are from the solution reference link. Thank you very much!!

[Solved] MultipartException: Failed to parse multipart servlet request; nested exception is java.lang.Runtime

1. Error log

org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nested exception is java.lang.RuntimeException: java.nio.file.NoSuchFileException: /tmp/undertow.8081.6091954911906268442/undertow2435234810596519507upload
        at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.handleParseFailure(StandardMultipartHttpServletRequest.java:124)
        at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.parseRequest(StandardMultipartHttpServletRequest.java:115)
        at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.<init>(StandardMultipartHttpServletRequest.java:88)
        at org.springframework.web.multipart.support.StandardServletMultipartResolver.resolveMultipart(StandardServletMultipartResolver.java:87)
        at org.springframework.web.servlet.DispatcherServlet.checkMultipart(DispatcherServlet.java:1178)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1012)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)

2. Cause of problem

After consulting the blog, I know the cause of the problem:
in Linux system, when the spring boot application is started with Java jar command, a Tomcat (or undertow) temporary directory will be generated in the/tmp directory of the operating system. The uploaded files must be converted into temporary files and saved under this folder. Because the files in the temporary/tmp directory are not used for a long time (10 days), the system executes the TMP directory cleaning service (systemd-tmpfiles-clean. Service), resulting in the cleaning of/TMP/undertow… 8090 files. However, when uploading, the undertow server needs to create/TMP/undertow… 8090/undertow… Upload temporary files, However, when calling files. CreateFile (…), you will find that the parent directory cannot be found, which leads to the above error.

3. Solution

1) Restart
cannot be done once and for all
2) the directory specified by the configuration file
needs to be manually created on the server
MKDIR – P/data/tmp

spring:
  servlet:
      multipart:
          location: /data/tmp

3) Add startup parameter – Java.TMP.Dir =/path/to/application/temp/

Jd-gui error: ERROR launching ‘JD-GUI’ [How to Solve]

JD-GUI

Check ide of jar

URL
http://java-decompiler.github.io/
Found JD-GUI error after upgrading Big Sur

ERROR launching ‘JD-GUI’
No suitable Java version found on your system!
This program requires Java 1.8+
Make sure you install the required Java version.

Need to replace files
[The source site may have anti-theft chain mechanism, we suggest to save the image and upload it directly (img-tyA4R80g-1635526847601)(evernotecid://4E256570-D902-4601-B913-1C7B0CBD5BA0/appyinxiangcom/ 23501392/ENResource/p275)]
Content
Replace the content

Feign calls cannot use “_” to report errors [How to Solve]

Solution: Change “_” to “-” or other
Note that the profile service name should be changed as well

at org.springframework.util.Assert.state(Assert.java:73) ~[spring-core-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.cloud.openfeign.FeignClientsRegistrar.getName(FeignClientsRegistrar.java:103) ~[spring-cloud-openfeign-core-2.2.0.RELEASE.jar:2.2.0.RELEASE]
at org.springframework.cloud.openfeign.FeignClientsRegistrar.getName(FeignClientsRegistrar.java:278) ~[spring-cloud-openfeign-core-2.2.0.RELEASE.jar:2.2.0.RELEASE]
at org.springframework.cloud.openfeign.FeignClientsRegistrar.registerFeignClient(FeignClientsRegistrar.java:233) ~[spring-cloud-openfeign-core-2.2.0.RELEASE.jar:2.2.0.RELEASE]
at org.springframework.cloud.openfeign.FeignClientsRegistrar.registerFeignClients(FeignClientsRegistrar.java:219) ~[spring-cloud-openfeign-core-2.2.0.RELEASE.jar:2.2.0.RELEASE]
at org.springframework.cloud.openfeign.FeignClientsRegistrar.registerBeanDefinitions(FeignClientsRegistrar.java:144) ~[spring-cloud-openfeign-core-2.2.0.RELEASE.jar:2.2.0.RELEASE]
at org.springframework.context.annotation.ImportBeanDefinitionRegistrar.registerBeanDefinitions(ImportBeanDefinitionRegistrar.java:86) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromRegistrars$1(ConfigurationClassBeanDefinitionReader.java:385) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) ~[na:1.8.0_131]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:384) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:337) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:242) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]
at com.yelin.ServiceHrUserApplication.main(ServiceHrUserApplication.java:16) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.2.1.RELEASE.jar:2.2.1.RELEASE]

Import CV2 & Numpy report red Warning and Error [How to Solve]

Usually the red report after import is because there is no module, use pip install cv2 to download the module, it will appear:
Could not find a version that satisfies the requirement cv2 (from versions: )
No matching distribution found for cv2
You are using pip version 18.1, however version 19.0.2 is available.
You should consider upgrading via the ‘python -m pip install –upgrade pip’ command.

At this point you need to type python -m pip install –upgrade pip
When the installation is complete, run this line “pip install opencv-python”, this line is to install the cv2 module, wait until the download is complete
To install the numpy module, you only need to pip install numpy
The summary is as follows:

python -m pip install --upgrade pip
pip install opencv-python
pip install numpy

How to Solve PIP3 error After upgrading pip3 install –upgrade pip

pip3 install –upgrade pip3 execution error after pip upgrade

Description
Traceback (most recent call last):
File “/home/brian/.local/bin/pip3”, line 7, in
from pip._internal.cli.main import main
File “/home/brian/.local/lib/python3.5/site-packages/pip/_internal/cli/main.py”, line 60
sys.stderr.write(f”ERROR: {exc}”)
^
SyntaxError: invalid syntax

Solution
Execute python3 –version to determine the python3 version visit https://bootstrap.pypa.io/pip/ Find the get-pip.py file for the corresponding python version at this URL and execute wget in the terminal https://bootstrap.pypa.io/pip/3.8/get-pip.pypython3 get-pip.py

Scrapy runs a crawler with an error importerror: cannot import name suppress

2021-11-02 15:56:03 [twisted] CRITICAL: 
Traceback (most recent call last):
  File "/Users/tanya/Library/Python/2.7/lib/python/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/Users/tanya/Library/Python/2.7/lib/python/site-packages/scrapy/crawler.py", line 104, in crawl
    six.reraise(*exc_info)
  File "/Users/tanya/Library/Python/2.7/lib/python/site-packages/scrapy/crawler.py", line 86, in crawl
    self.engine = self._create_engine()
  File "/Users/tanya/Library/Python/2.7/lib/python/site-packages/scrapy/crawler.py", line 111, in _create_engine
    return ExecutionEngine(self, lambda _: self.stop())
  File "/Users/tanya/Library/Python/2.7/lib/python/site-packages/scrapy/core/engine.py", line 67, in __init__
    self.scheduler_cls = load_object(self.settings['SCHEDULER'])
  File "/Users/tanya/Library/Python/2.7/lib/python/site-packages/scrapy/utils/misc.py", line 46, in load_object
    mod = import_module(module)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/tanya/Library/Python/2.7/lib/python/site-packages/scrapy/core/scheduler.py", line 7, in <module>
    from queuelib import PriorityQueue
  File "/Users/tanya/Library/Python/2.7/lib/python/site-packages/queuelib/__init__.py", line 1, in <module>
    from queuelib.queue import FifoDiskQueue, LifoDiskQueue
  File "/Users/tanya/Library/Python/2.7/lib/python/site-packages/queuelib/queue.py", line 7, in <module>
    from contextlib import suppress
ImportError: cannot import name suppress

resolvent:

pip uninstall attrs
pip uninstall queuelib
pip install queuelib==1.5.0
pip install attrs

Python calls C to generate so library and reports an error: undefined symbol

  After using C + + to implement some algorithm functions, there is an error when calling Python:

AttributeError: /..../libHessian4Nii.so: undefined symbol: callVesselSegNii

    According to Du Niang, it is because the function name will be renamed in the C + + compiled file (which is convenient to realize the overload function), so the function name cannot be found when calling the script.

The solution is to use   extern “C”   Just enclose the header file to be exposed. Examples are as follows:

extern "C"{

  int callVesselSegNii(char* oriNiiFile, char* maskNiiFile, char* save_path);
 
}

After recompilation, call the normal!!!!