Tag Archives: Problem solving

[Solved] Jupyter Notebook Start Error: Fatal error in launcher: Unable to create process using

Problem description

Previously, rename a CONDA virtual environment with the following command:

conda create -n torch --clone rl
conda remove -n rl --all

Then start jupyter from Torch virtual environment, and the following error is reported:

Fatal error in launcher: Unable to create process using
"g:\miniconda3\envs\rl\python.exe"
 "G:\miniconda3\envs\torch\Scripts\jupyter-notebook.EXE"

Reference solutions

I checked the online information and found that it was better after a mess… So I’m not sure which operation fixed the problem. What’s more certain is the last few executed commands:

pip uninstall ipython
pip uninstall jupyter
pip uninstall notebook

Or (after the above command is executed, try installing jupyter first. If the problem cannot be solved, execute the following command)

pip install pip-autoremove
pip-autoremove jupyter -y

Then install jupyter

pip install jupter

[Solved] #include errors detected. Please update your includePath.

When I saw the solution, I didn’t know why my first reaction was: Sima Danghuo, doctor.

Under the. Vscode folder, locate C_ cpp_ Properties.json, I don’t need to tell you that people have told you about their mistakes.

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "/usr/include/**",		add this line
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "gnu17",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "linux-gcc-x64",
            "compileCommands": "${workspaceFolder}/build/release-cpp11/compile_commands.json"
        }
    ],
    "version": 4
}

[Solved] SpringMVC Run Error: SEVERE-Servlet.service() for servlet jsp threw exception

Today, I was learning spring MVC. Everything was difficult at the beginning. I didn’t expect it to be so difficult. The most basic Hello World was trapped for half an hour. The main problem was that Tomcat 10 version didn’t adapt to and Maven relied on. The error was: servlet. Service () for servlet JSP thread exception Java. Lang. NullPointerException , and the following is the specific solution

Read the original text

At the beginning of writing dependency, I found that groupid in the book was javax , and I had suffered such a loss before. In order to adapt it to my Tomcat 10, I changed it to Jakarta . As a result, when writing controller , the method can only recognize javax , and I can’t change the source code again, There is no way to replace dependence with this

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>4.0.1</version>
</dependency>
<dependency>
    <groupId>javax.servlet.jsp</groupId>
    <artifactId>javax.servlet.jsp-api</artifactId>
    <version>2.3.3</version>
</dependency>

Not surprisingly, when the Tomcat server is executed, it always reports an error saying that org.springframework.web.servlet.dispatcherservlet in the configuration file is not a servlet, so there is no way but to change the method

I thought Maven could play Tomcat plug-in and paste the dependent code immediately

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
        </plugin>
    </plugins>
</build>

Continue to run and report an error: servlet. Service () for servlet JSP thread exception Java. Lang. NullPointerException , go to stackoverflow and say that the range must be set to provided , and then run to display it. Later, switch back to normal tomcat operation with a try state, but the result is still not good

PS: finally switched back to Tomcat version 9.052

Resolve importerror: cannot import name ‘totensor’ error

PS: This article is mainly used for self collation and summary. The code involved has been successfully run on my computer. I’m not honored if I happen to help you
when I run the baseline of a competition, this importerror: cannot import name 'totensor' error appears, The solution is as follows:
the error reporting statement is defined in my code as follows: from evaluations.python import totensor
first, it should be changed to: from evaluations.python.transforms import totensor
then a new problem appears when running

According to its tips, I revised the versions of evaluations, that is, PIP install evaluations = = 0.5.2 , and finally solved the problem.

The request was rejected because the URL contained a potentially malicious String “//“

Problem description

After the introduction of spring security, there is no problem using Vue proxy locally. There is a problem using nginx. The problem is located in the nginx configuration

Solution:

# rewrite ^(/api/?.*)$ /$1 break;  // old
 rewrite ^/api/(.*)$ /$1 break;    // modified

Explanation
take blog.lhuakai.top/api/getxxx as an example

nginx found /API , replaced the match to /api.getxxx/ with $1 (the content in the first group) getxxx and finally became blog.lhuakai.top/getxxx

When using quartus for function simulation, “testbench” appears_ vector_ input_ The solution of “file option does not exist”

Environment: quartus 18 prime Standard Edition

1. Create a new VMF file

Add node or bus

2. Click processing – & gt; start – & gt; start test bench template writer, and a. VHT suffix file will be generated under the path of “project folder/simulation/Modelsim” (the path may be different due to different personal settings).

3. Copy the. VHT suffix file in the path of “project folder/simulation/Modelsim” to the path of “project folder/simulation/QSIM”.

4. Open the vWF file created in step 1, click simulation – & gt; simulation settings, and the following interface will appear. Modify the contents in the functional simulation settings tab as follows (note that the direction of path separator in quartus software is opposite to that in windows, one is’/’, the other is’ \’):

(1) Change “- vector” in the testbench generation command (functional simulation) column to_ Change the path after “source” to the path of your own VWF file (note that the file name should also be changed to the name of your own file), “– testbench_ Change the path after “file” to the path of the. VHT suffix file copied in step 3 (note that the file name should also be changed to your own file name);

(2) Change “- output” in the netlist generation command (functional simulation) column_ The path after “directory” is changed to “project folder/simulation/QSIM”.

(3) Add VCOM – work in the Modelsim script (functional simulation) column Waveform.vwf.vht Change the file name to your own.

(4) If you want to do timing simulation, modify the contents of the timing simulation settings tab.

5. Finished, add input data and click simulation.

Solve the problem of installing APK after Android studio compilation: error while installing apk

1. Error description

Today, when I compiled the app with Android studio and installed APK, I reported an error as follows:

The APK file build\outputs\apk\OYP_2.3.4_I2Base_6476_official_debug.apk does not exist on disk.
Error while Installing APK

1 2

As shown in the figure below,

2. Solutions

1. Try build – & gt; clean project recompilation or invalid
2. Try to restart Android studio is invalid

Then I went to the build/outputs/APK directory and found that the APK file was compiled, but the file name was:
oyp_ 2.3.4_ I2Base_ 6478_ official_ debug.apk
as shown in the figure below:

So the reason is that the compiled APK file of Android studio is

OYP_ 2.3.4_ I2Base_ 6478_ official_ debug.apk

And it’s going to install the APK file name

OYP_ 2.3.4_ I2Base_ 6476_ official_ debug.apk
as a result, an error will be reported. Google looked up the error and found it in http://stackoverflow.com There is a solution to this error on the website, and the link is as follows:
the http://stackoverflow.com/questions/34039834/the-apk-file-does-not-exist-on-disk

Solution:
as shown in the figure below:

Step 1: click the gradle button in the Android studio sidebar, as shown below

Step 2: refresh the gradle configuration

The third step: recompile, no more error.

Springboot startup error – classnotfound Exception:EnhancerBySpringCGLIB

Error classnotfound in springboot startup Exception:EnhancerBySpringCGLIB

Error information solution

Error information

Spring boot 2.4.1 project, start to report the following error, but start will be normal, although it does not affect the use, but look very boring.

java.lang.ClassNotFoundException: cn.demo.Application$$EnhancerBySpringCGLIB$$310af73e
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at cn.demo.ocean.common.prop.core.spring.SpringConfigPropertiesHandle.handleSpringConfig(SpringConfigPropertiesHandle.java:47)
	at cn.demo.ocean.common.prop.core.spring.ConfigServerPostProcessor.doProcessProperties(ConfigServerPostProcessor.java:305)
	at cn.demo.ocean.common.prop.core.spring.ConfigServerPostProcessor.processProperties(ConfigServerPostProcessor.java:122)
	at cn.demo.ocean.common.prop.core.spring.ConfigServerPostProcessor.postProcessBeanFactory(ConfigServerPostProcessor.java:102)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:299)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:170)
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:751)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:569)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298)
	at cn.demo.Application.main(Application.java:19)
	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.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
java.lang.ClassNotFoundException: cn.demo.config.Swagger2Config$$EnhancerBySpringCGLIB$$589bf224
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at cn.demo.ocean.common.prop.core.spring.SpringConfigPropertiesHandle.handleSpringConfig(SpringConfigPropertiesHandle.java:47)
	at cn.demo.ocean.common.prop.core.spring.ConfigServerPostProcessor.doProcessProperties(ConfigServerPostProcessor.java:305)
	at cn.demo.ocean.common.prop.core.spring.ConfigServerPostProcessor.processProperties(ConfigServerPostProcessor.java:122)
	at cn.demo.ocean.common.prop.core.spring.ConfigServerPostProcessor.postProcessBeanFactory(ConfigServerPostProcessor.java:102)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:299)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:170)
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:751)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:569)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298)
	at cn.demo.Application.main(Application.java:19)
	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.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

solve

Baidu has failed for many times, so we can only read the error report carefully. Last line found:

at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

Doubt is the problem of devtools, and then pom.xml Devtools dependency removal in

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>

It’s solved (⊙ o ⊙)

org.apache.jasper . jasperexception: unable to compile class for jsp: error resolution

1、 The main reason for this problem is that the version of servlet API does not match the version of Tomcat.

2、 Solutions.
I’m changing the version of Tomcat.
Put the plug-in code below into the pom.xml In the middle.

<!--<build>-->
    <!--<plugins>-->
      <!--<plugin>-->
        <!--<groupId>org.apache.tomcat.maven</groupId>-->
        <!--<artifactId>tomcat7-maven-plugin</artifactId>-->
        <!--<version>2.2</version>-->
        <!--<configuration>-->
          <!--<port>8888</port>-->
        <!--</configuration>-->
      <!--</plugin>-->
    <!--</plugins>-->
  <!--</build>-->

Start with tomcat7: run.

Start with tomcat7.
The problem can be solved.