Author Archives: Robins

Clean_pvnet Error: task must be specified [How to Solve]

Run clean_Pvnet encountered the following error: task must be specified

I have never encountered such an error report, and Baidu has not found the relevant results. My heart is impatient, which has plagued me for a long time and I have been unable to think of a solution; After line by line debugging, it is found that there is a problem with the configuration. This is the code written by the author when writing the configuration file, and then modify the parameters one by one to solve the problem of error reporting. We hereby bear in mind that if an error is reported, debug to find the problem first
solution

debug found that the task of the configuration parameter is set to null, resulting in an error. Later, it is modified to pvnet, and cfg.network is also modified

Ant design vue table Error: h is not defined [How to Solve]

Cause

When using table, because there are too many columns data, the data in columns is split into a separate JS file
and because customrender needs to be used and JSX needs to be used for rendering, an error is reported

Solution:

The final reference here is the solution given by a person in GitHub
address: https://github.com/vueComponent/ant-design-vue/issues/1183

Write the following in a separate JS file

import Vue from 'vue'
const h = new Vue().$createElement

This will solve the above problems

[Solved] JS Error: Uncaught SyntaxError: Illegal return statement

let arr = ['a','b','c']
      for( let i=0;i<=arr.length;i++){
        if (i ==2 ){
          console.log(arr[i])
          return  // error: Uncaught SyntaxError: Illegal return statementcan only be used in functions
        } 
      }

Return can only be used in functions

function run() {
  let a = 1
  if (a == 1) {
    return
  }
  console.log(2); // will not output, return interrupts the execution of the code that follows
}

CIBERSOFT $operator is invalid for atomic vectors [How to Solve]

When Cybersoft was run with R for immune infiltration annotation

Error report found

$ operator is invalid for atomic vectors
#and the problem occurs in the source code
weights = t(out[[t]]$coefs) %*% out[[t]]$SV

The search failed for a long time and was finally solved, so I came to make a record

Yes, the package is not installed

[Solved] ERROR 1054 (42S22): Unknown column ‘password‘ in ‘field list‘

I don’t remember the MySQL login password. I couldn’t log in. I wanted to modify the MySQL password, but an error was reported
ERROR 1054 (42S22): Unknown column ‘password’ in ‘field list’

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> update user set password="123" where user="root";
ERROR 1054 (42S22): Unknown column 'password' in 'field list'

Looking at the table in detail, it is found that there is no password field in the table, and the password field is changed to authentication_ String, as follows:

mysql> desc user;
+------------------------+-----------------------------------+------+-----+-----------------------+-------+
| Field                  | Type                              | Null | Key | Default               | Extra |
+------------------------+-----------------------------------+------+-----+-----------------------+-------+
| Host                   | char(60)                          | NO   | PRI |                       |       |
| User                   | char(32)                          | NO   | PRI |                       |       |
| Select_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Insert_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Update_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Delete_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Create_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Drop_priv              | enum('N','Y')                     | NO   |     | N                     |       |
| Reload_priv            | enum('N','Y')                     | NO   |     | N                     |       |
| Shutdown_priv          | enum('N','Y')                     | NO   |     | N                     |       |
| Process_priv           | enum('N','Y')                     | NO   |     | N                     |       |
| File_priv              | enum('N','Y')                     | NO   |     | N                     |       |
| Grant_priv             | enum('N','Y')                     | NO   |     | N                     |       |
| References_priv        | enum('N','Y')                     | NO   |     | N                     |       |
| Index_priv             | enum('N','Y')                     | NO   |     | N                     |       |
| Alter_priv             | enum('N','Y')                     | NO   |     | N                     |       |
| Show_db_priv           | enum('N','Y')                     | NO   |     | N                     |       |
| Super_priv             | enum('N','Y')                     | NO   |     | N                     |       |
| Create_tmp_table_priv  | enum('N','Y')                     | NO   |     | N                     |       |
| Lock_tables_priv       | enum('N','Y')                     | NO   |     | N                     |       |
| Execute_priv           | enum('N','Y')                     | NO   |     | N                     |       |
| Repl_slave_priv        | enum('N','Y')                     | NO   |     | N                     |       |
| Repl_client_priv       | enum('N','Y')                     | NO   |     | N                     |       |
| Create_view_priv       | enum('N','Y')                     | NO   |     | N                     |       |
| Show_view_priv         | enum('N','Y')                     | NO   |     | N                     |       |
| Create_routine_priv    | enum('N','Y')                     | NO   |     | N                     |       |
| Alter_routine_priv     | enum('N','Y')                     | NO   |     | N                     |       |
| Create_user_priv       | enum('N','Y')                     | NO   |     | N                     |       |
| Event_priv             | enum('N','Y')                     | NO   |     | N                     |       |
| Trigger_priv           | enum('N','Y')                     | NO   |     | N                     |       |
| Create_tablespace_priv | enum('N','Y')                     | NO   |     | N                     |       |
| ssl_type               | enum('','ANY','X509','SPECIFIED') | NO   |     |                       |       |
| ssl_cipher             | blob                              | NO   |     | NULL                  |       |
| x509_issuer            | blob                              | NO   |     | NULL                  |       |
| x509_subject           | blob                              | NO   |     | NULL                  |       |
| max_questions          | int(11) unsigned                  | NO   |     | 0                     |       |
| max_updates            | int(11) unsigned                  | NO   |     | 0                     |       |
| max_connections        | int(11) unsigned                  | NO   |     | 0                     |       |
| max_user_connections   | int(11) unsigned                  | NO   |     | 0                     |       |
| plugin                 | char(64)                          | NO   |     | mysql_native_password |       |
| authentication_string  | text                              | YES  |     | NULL                  |       |
| password_expired       | enum('N','Y')                     | NO   |     | N                     |       |
| password_last_changed  | timestamp                         | YES  |     | NULL                  |       |
| password_lifetime      | smallint(5) unsigned              | YES  |     | NULL                  |       |
| account_locked         | enum('N','Y')                     | NO   |     | N                     |       |
+------------------------+-----------------------------------+------+-----+-----------------------+-------+
45 rows in set (0.00 sec)

Solution:

mysql> update user set authentication_string="123" where user="root";        
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> select user,authentication_string from user where user="root";
+------+-----------------------+
| user | authentication_string |
+------+-----------------------+
| root | 123                   |
+------+-----------------------+
1 row in set (0.00 sec)

[Solved] Android Studio Run Error: Error while executing: am start -n

Error details, problem causes and Solutions

Error reporting details

08/19 09:54:18: Launching app
$ adb install-multiple -r -t D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_4.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_9.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_3.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_8.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_6.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_5.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\dep\dependencies.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_7.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_2.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_1.apk D:\work\self\CallAutoRecord\app\build\intermediates\resources\instant-run\debug\resources-debug.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_0.apk D:\work\self\CallAutoRecord\app\build\intermediates\instant-run-apk\debug\app-debug.apk 
Split APKs installed in 10 s 564 ms
$ adb shell am start -n "com.guoqi.callautorecord/com.guoqi.callautorecord.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Error while executing: am start -n "com.guoqi.callautorecord/com.guoqi.callautorecord.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.guoqi.callautorecord/.MainActivity }
Error type 3
Error: Activity class {com.guoqi.callautorecord/com.guoqi.callautorecord.MainActivity} does not exist.

Error while Launching activity

Cause of problem

The mobile phone system bug did not uninstall the app completely, resulting in installation failure and failure to run.

Solution

First go to the SDK \ platform tools path and find the ADB command
. Then, in the current directory, open the command line window and enter ADB devices .

Confirm that the mobile phone is connected, then use ADB to uninstall, enter the command, ADB uninstall com.guoqi.callautorecord ( com.guoqi.callautorecord is my own package name, and I want to change it to my own)
is installed successfully, as shown in the figure below

[Solved] Logstash Error: Bad file descriptor

no errors in the startup log using bin/logstash-f config/D_HINFO_PDT.conf.
When I use nohup bin/logstash-f config/D_HINFO_PDT.conf & startup.
Every second the following error is reported.
2017-10-30T10:52:13,412][ERROR][logstash.pipeline        ] A plugin had an unrecoverable error. Will restart this plugin.
Plugin: <LogStash::Inputs::Stdin id=>”d82cf8f6e66e1ce48c50c9d2d840029f3296238a-1″, enable_metric=>true, codec=><LogStash::Codecs::Line id=>”line_6e3830b8-b4c6-4fb8-b15c-27356ae29021″, enable_metric=>true, charset=>”UTF-8″, delimiter=>”\n”>>
Error: Bad file descriptor – Bad file descriptor 

 

Solution: When bin/logstash is started directly, there is a plugin to read data from stdin.
Once the nohup is used, it means that stdin is empty, so it will naturally report bad file descriptor error.
To solve this, one is to install logstash as a service, and the other is to add a parameter at startup.

nohup bin/logstash -f config/D_HINFO_PDT.conf 0</dev/null &

Element Error when await is used in UI form submission [Solved]

Correct writing: use async before valid

/**Submit*/
        handleSubmit() {
            this.$refs["form"].validate(async valid => {
                if (valid) {
                    await this.handleUploadFile();
                }
                ApiUpdateOrganBrand(this.form).then(res => {
                    console.log(res);
                    this.$message.success("Brand configuration success");
                    this.handleClose();
                });
            });
        },

I started by writing async in front of handle submit, reporting the unexpected reserved word ‘await’

PCL 1.8.1 VTK 9.0 QT 5.14.9 [How to Solve]

Severity code description the project file line is prohibited from displaying status
error c2039 “immediatemodernetingoff”: project1 D:\PCL 1.8.1\include\pcl-1.8\PCL\visualization\impl\PCL is not a member of “vtkmapper”_visualizer.hpp 1431

#include <vtkRenderWindow.h>

2039 “immediatemodulerenderingoff”: not a member of “vtkmapper”

It was found that the ImmediateModeRenderingOff() method of vtkMapper was removed in vtk8.10 onwards, so in order to get the pcl1.9.1 code to compile, you just need to comment out the corresponding line of code in the error message

[Solved] Error while deploying HAP reported by Hongmeng deveco studio

It’s been a long time since I used DevEco-Studio, and today I ran a demo that reported an error, which I didn’t want to do.
Error message.
$ hdc file send /Users/likai/DevEcoStudioProjects/player/entry/build/outputs/hap/debug/entry-debug-unsigned.hap /sdcard/1bde11bbf51f4783a54e2e3616f6a0cd/entry-debug-unsigned.hap
$ hdc shell bm install -p /sdcard/1bde11bbf51f4783a54e2e3616f6a0cd/
Failure[INSTALL_PARSE_FAILED_USESDK_ERROR]
$ hdc shell rm -rf /sdcard/1bde11bbf51f4783a54e2e3616f6a0cd
Error while Deploying HAP
Solution.
Find the project’s configuration file config.json, open it and delete “releaseType”: “Beta1” , then run the perfect solution

Gamit Run Error: grep SP file :bad year 2021 [How to Solve]

Title GAMIT operation error grep SP file: bad year 2021

Problem Description: when using GAMIT to solve the data in 2021, the error occurred in processing the precise ephemeris
problem analysis: the reason is that gamit10.71 can only be processed until 2020 when the program is set
solution: Step 1: use the CD command to enter the GAMIT file under gamit10.71
Step 2: run grep 2020 */* f
Step 3: find lib/Timcon. F and use VIM to view the file VIM lib/Timcon. F
search 2020/2020 in the file and change 2020 to 2120 (any value greater than 2021)

Step 4: exit vim and open the Lib/rrinex. F command Make VI lib/rrinex also find the 2020 to 2120 command/2020
Step 5: open orbits/getics. F VI orbits/getics. F to change 2020 to 2120

Step 6: enter the gamit10.71 directory and recompile GAMIT./install_software

Pandas Error: ValueError: setting an array element with a sequence.

Pandas apply returns multiple columns

Originally, I wanted to process the dataframe line by line through NP. Vectorize() and return several new fields. An error valueerror: setting an array element with a sequence

def test():
    arr = np.random.randn(4,4)
    cols = ['a', 'b', 'c']
    df = pd.DataFrame(data=arr,columns=['e','f','g','h'])
    def func(a,b,c):
        output1 = a+1
        output2 = b*2
        output3 = c-4
        return pd.Series([output1,output2,output3])
    vfunc = np.vectorize(func)
    df[cols] = vfunc(df['e'],df['f'],df['g'])
    print(df)
test()

The reason for the error is that the assigned DF [cols] is inconsistent with the dimension returned by vffunc, and the shape between the returned data frame and the result does not match. Use apply to solve it, and the parameter result_ Type = “expand” means that the result will be converted into columns, and each returned value will be used as the value in the column of result dataframe. In apply (func), the number of results returned by func should be the same as the number of col columns in DF [col]

def test():
    arr = np.random.randn(4,4)
    cols = ['a', 'b', 'c']
    df = pd.DataFrame(data=arr,columns=['e','f','g','h'])
    def func(row):
        a,b,c = row['e'],row['f'],row['g']
        output1 = a+1
        output2 = b*2
        output3 = c-4
        return output1,output2,output3
    df[cols] = df.apply(func,axis=1, result_type="expand")
    print(df)
test()

output

          e         f         g         h         a         b         c
0  0.493280 -0.092513 -3.014135 -0.361842  1.493280 -0.185027 -7.014135
1  0.300695 -0.745392  0.591653 -1.752471  1.300695 -1.490785 -3.408347
2 -0.033944 -1.556307 -0.359979  1.808213  0.966056 -3.112615 -4.359979
3  0.701741 -0.272337  0.041114  0.150049  1.701741 -0.544674 -3.958886

For a single column

df['id'] 

And

ID = ['id']
df[ID]

The results obtained are different. The former is [1,2,3,4], and the latter is [[1], [2], [3], [4]

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.apply.html