Category Archives: How to Fix

Splash fcgi: child exited with: 127 possible causes

The first is dynamic link library, please refer to https://blog.csdn.net/lucky_ huijun/article/details/105165359

The second is that there is no correct input path name. The following is wrong

spawn-fcgi -a 127.0.0.1 -p 9001 -f a.out

The right thing to do is

spawn-fcgi -a 127.0.0.1 -p 9001 -f /a.out

If it’s the second mistake, slap yourself^_^

Not registered via @EnableConfigurationProperties or marked as Spring component

In springboot, there are the following problems when binding the properties in the class with the configuration in the configuration file:

When using @ configurationproperties, the following prompt appears at the top of idea:

Click the prompt to jump to the official document, and then add the following configuration in POM. XML

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
    <optional>true</optional>
</dependency>

The effect after adding is that when you write the configuration file (YML, properties configuration file), you will be prompted

After the above is finished, @ configurationproperties will report an error below. You can see it according to the prompt

Not registered via @ enableconfigurationproperties or marked as spring component    @ Enable configuration properties (person. Class),

After adding, the error is really gone, but in the unit test of springboot, you will see the following error: could not autowire. No beans of ‘person’ type found

  Go back to the user-defined bean person, add the annotation @ component and declare to add the component to the container so that it can be used?

“Only if this component is a component in the container can the @ configurationproperties function provided by the container be used.”

Type error: cannot unpack non Iterable non type object appears when starting Bert server in Ubuntu system

Type error: cannot unpack non Iterable non type object appears when starting Bert server in Ubuntu system

Questions

Enter Bert serving start – model_ dir chinese_ L-12_ H-768_ A-12 -num_ worker 1 -max_ seq_ In the case of len 64, type error: cannot unpack non Iterable non type object is reported

resolvent

    check whether the startup path is correct, – model_ Dir is followed by the downloaded and unzipped corpus model address. The figure below is my path after decompression. You can right-click on the interface and select “open on terminal”

    just re-enter the command. This is the reason for my problem. After re entering the command, no error will be reported
    2. Check your tensorflow version, which is not supported at present. My tensorflow version is 1.15.0. 0

    Finally, it can run without any error

Typeerror occurred during gitbook installation: cb.apply is not a function

Typeerror occurred during gitbook installation: cb.apply is not a function

Such as the title. An error is reported during the installation of gitbook, as shown in the figure below<

solution:
find the file
C: users: Your Name: appdata: roaming: NPM: node_ modules\gitbook-cli\node_ modules\npm\node_ In the following location:

the

 fs.stat = statFix(fs.stat)
 fs.fstat = statFix(fs.fstat)
 fs.lstat = statFix(fs.lstat)

Three lines of code can be commented out.

finish

Error in tensorflow loading model valueerror: unknown layer: functional

Contents of articles

Problem description solution references

Problem description

When you pull the model trained by the server to your own computer, tensorflow loads the model and reports an error valueerror: unknown layer: functional error

import tensorflow as tf

model = tf.keras.models.load_model('test.h5')

The server

python 3.6.13
tensorflow-gpu==2.3.0

Own computer

python 3.6.5
tensorflow-gpu==2.1.0

Solution

pip install tensorflow-gpu==2.3.0

References

    Value

“class“ object is not subscriptable

When writing python3 code, when running,
an error is reported. This class object is not subscriptible
reports that it has no subscript, but when the subscript is used, check the code carefully. Sure enough,
there is a place where I want to use the attribute under the class. I am not “dot”, but []
which causes this error. I must check patiently where this class attribute is used

if job.mode == value or job['mode'] == value:

go through

if job.mode == value or job.mode == value

Solve the problem of springboot and unit test starting applicationrunner

During the execution of unit test, applicationrunner was started unexpectedly, resulting in the initialization of netty server and the failure of unit test execution.

Solution: by setting the profile of bean corresponding to applicationrunner

Add notes to corresponding components:

@Profile(“! test”)

Add notes to unit tests:

@ActiveProfiles(“test”)

TypeError: object of type ‘Cursor‘ has no len()

Question:

When using pymysql, the find() function returns a query result of type cursor
at that time, it was thought that what was returned was a list, so the len() function was directly used to calculate the length in the following loop. But an error is reported, such as the title information, which means that the returned data is of cuesor type, and the len() function is not supported.

Solution:

Use. Rowcount
to  

Feignexception $unauthorized is reported by introducing security call service

Originally, it was a good idea to study spring cloud. Later, security was introduced for security. Then there were various problems. First, the service could not be registered (solution: after introducing security, the service could not be registered with Eureka), and then the service could not be called,

The error log is as follows:

feign.FeignException$Unauthorized: [401] during [GET] to [ http://eureka-client/client/test ] [ClientService#getClientService()]: [{“timestamp”:”2021-07-08T09:01:18.940+00:00″,”status”:401,”error”:”Unauthorized”,”message”:””,”path”:”/client/test”}]

It’s easy to understand if you read a newspaper error: the call has not been authenticated. This authentication is built-in to security. There are some methods on the Internet, but they are messy and many of them don’t work. Therefore, it’s recommended to turn off the built-in call authentication of security (add logic to the call authentication side to ensure security)

Add a configuration file to the server:

@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity httpSecurity) throws Exception {
        httpSecurity.authorizeRequests().anyRequest().permitAll().and().logout().permitAll();
    }

    @Autowired
    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
        auth.userDetailsService(userDetailsService());
    }

}

Due to the version problem, sometimes you need to add additional notes to the startup file

@SpringBootApplication(exclude = {org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class})

The test is effective
 

Vue uses this. $refs. Subcomponent Ref. method to report an error: cannot read property ‘resetfields’ of undefined problem

Cannot read property ‘resetfields’ of undefined problem
Problem Description:
use element to develop background system, edit and add the same pop-up box
bind the commentform object in data
in order to clear the form in the new pop-up box, use this. $refs [formname]. Resetfields()
click Add to display the pop-up box for the first time, Will report an error
“[Vue warn]: error in event handler for” click “:” typeerror: cannot read property ‘resetfields’ of undefined “”

Cause of the problem: after mounted loads the table data, the hidden pop-up box is not compiled and rendered into the dom.

So @ Click = “dialogformvisible = true; Reset form (‘dlgform ‘) “when the click pops up

r

e

f

s

and

no

yes

Get

take

reach

d

o

m

element

element

guide

To

r

e

s

e

t

F

i

e

l

d

s

o

f

u

n

d

e

f

i

n

e

d

solution

Decision

square

method

one

(

Refs does not get DOM element, resulting in ‘resetfields’ of undefined solution: 1(

Refs does not get DOM element, resulting in ‘resetfields’ of undefined solution: 1. (after next update of nexttick DOM)

        resetForm(formName) {
            this.$nextTick(()=>{
                this.$refs[formName].resetFields();
            })                
        },

2. (if you click add for the first time, there is no need to reset. It is judged according to the element undefined.)

            if (this.$refs[formName] !== undefined) {
                this.$refs[formName].resetFields();
            }

Note: a series of JS operations on DOM should be put into the callback function of Vue. Nexttick()

Spring boot does not take effect when using @ size to verify a single set parameter of the control layer

Spring boot does not take effect when using @ size to verify a single set parameter of the control layer

1. Problem description

In the figure below, there is a type of List & lt; String> method parameter, when using @ size to mark the verification quantity, it is found that no exception is thrown

2. Solution

You need to add the @ validated annotation on the control class, and restart the project