Category Archives: Error

ES Error: Alternatively, set fielddata=true on [How to Solve]

Es reports an error when executing aggregate query: alternately, set fielddata = true on

GET /megacorp/employee/_search
{
  "aggs": {
    "all_interests": {
      "terms": { "field": "interests" }
    }
  }
}

Execute the following command to start fielddata

PUT /your_index_name/_mapping?pretty
{
  "properties": {
    "your_field_name": { 
      "type": "text",
      "fielddata": true
    }
  }
}

[Solved] Open3d error: unable to display image using open3d

Error Messages:

ibGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast

Solution:
The computer may use the independent display + integrated display at the same time, and switch to the independent display mode.

[Solved] ngrok 1.7 Build Error: remote error: tls: bad certificate

Ngrok 1.7 build error

The ngrok server has been rebuilt recently. Refer to: https://zhuanlan.zhihu.com/p/33794707
Since the version of ngrok V1 has not been maintained for a long time, after compilation, the server encountered an error at startup: Remote Error: TLS: bad certificate

after searching the Internet for a long time, some people said it was the problem of the golang version, After reducing the version of golang from 1.17 to 1.9, it is still not solved. I accidentally found the log prompt x509 on the client: certificate is valid for XXX, not ngrokd.ngrok.com. I found that it may be the problem of the certificate domain name.

After searching the source code, I found that the default domain name address is ngrokd.ngrok.com, so I found a solution,
find the client source code and change the configuration. The file is:

vim ./src/ngrok/client/model.go

The defaultserveraddr in line 24 is changed to its own server domain name and port

When recompiling the self signed certificate, the domain name of the certificate must exactly match the default address here, otherwise an error will be reported.

[Solved] Grafana Error: Panel plugin not found grafana-piechart-panel

1. When using grafana, the error panel plugin not found grafana pie chart panel is encountered. The grafana pie chart panel is not installed. It can be displayed normally after installation

2. Install the plug-in, download and install it, put it in the plug-in directory/var/lib/grafana/plugins, and restart grafana.

wget  https://grafana.com/api/plugins/grafana-piechart-panel/versions/latest/download -O grafana-piechart-panel.zip
 unzip grafana-piechart-panel.zip 
 mv grafana-piechart-panel grafana_data/plugins/
 chown -R 472:472 *
 docker restart grafana

3. Check whether it is normal after restart

[Solved] ffmpeg error reporting: subprocess. Calledprocesserror: Command ‘ffmpeg, unknown encoder: “libx264″“

0x00 problem description

Today we are compressing the video into different quality in the lab, so we need to use the FFmpeg tool (we have to say that this tool is really powerful), but when we install it, we call out the following mistakes when we call it in Python script.

subprocess.CalledProcessError: Command 'ffmpeg -i /data/xiangtao/dataset/celeb-DF/0_Celeb-real/id0_0000.mp4 -vf select="eq(pict_type\,I)" -vsync vfr -qscale:v 2 -f image2 /data/xiangtao/dataset/tmp/VA-MLP/celeb-DF/11-12/id0_0000/%02d.jpg' returned non-zero exit status 127.

The reason is that libx264 encoder is not installed,

Unknown encoder: "libx264"

0x01 solution

Baidu has been trying several ways for a long time, most of the solutions have to be reinstalled FFmpeg, then install the libx264 Library in the process of installation, try it all wrong, and later discovered that there is a package in the python environment, then ffmpeg will uninstall the python script, which calls for the use of this package. Based on this idea, I reinstalled the ffmpeg package and solved it perfectly!!!

0x02 specific steps

    1. if ffmpeg is available in the current Python environment, uninstall it first
pip uninstall ffmpeg
or
conda uninstall ffmpeg

Reinstall

pip install ffmpeg
or
conda install ffmpeg

0x03 some gossip

[Solved] SHELL Run Error: “-BASH: ./TEST.SH: /BIN/BASH^M: BAD INTERPRETER: NO SUCH FILE OR DIRECTORY”

Solve the error reported by the running shell

-bash: ./test.sh: /bin/bash^M: bad interpreter: No such file or directory

What is the reason? There is reason to suspect that it is a file format problem? We use VIM test.sh to enter the test.sh file, and then execute it in the bottom mode: set FF to check. The result shows that fileformat = DOS. Look, it is indeed a file format problem. How to solve it?

Solution:

[root@admin .sh]# vim test.sh

Execute: e + + FF = UNIX%, then delete the ^ m symbol
save and exit

or:

[root@admin .sh]# sed -i "s/\r//" test.sh

Or:

[root@admin .sh]# dos2unix test.sh

Or: VIM test.sh open the file, execute: set FF = UNIX, set the file to UNIX, then execute: WQ, and save it in UNIX format.

Entry name ‘META-INF/xxx‘ collided [How to Solve]

The following errors are suddenly reported when running the project today:

Entry name ‘META-INF/androidx.vectordrawable_vectordrawable.version’ collided

The reason for the problem is that I have typed the test installation package, and the above problems may occur when running later.

The solution is as follows:

Method 1. Re clean project or rebuild project.

Method 2. App — > build–> outputs–> apk–> debug–> Find the corresponding installation package and delete it.

[Solved] Loadrunner Error: with parameter delimiters is not a parameter.

Warning: The string ‘”xxxx:xxxx”‘ with parameter delimiters is not a parameter.

The reason is that my input parameter is a JSON nested form with {}

Solution:

This warning can be avoided by configuring it in the LoadRunner.

Tools> Options> Scripting> Parameters

In the red box in the following figure, the default is   {   and   }

Replace with  < and >

[Solved] Flutter Amap plug-in amap_location error: AmapLocationPlugin.java:287: error

1. Foreword

Plug in amap in use_ The location suddenly reported an error today. The project cannot run. The error prompt is as follows:

2. Error prompt

.../amaplocation/AmapLocationPlugin.java:287:Error: Unreported exception error Exception; it must be caught or declared in order to throw locationClient = new AMapLocationClient(getApplicationContext());

3. Cause investigation

After modifying the one-to-one communication without results and one-to-one search for information, I accidentally saw the discussion in the group and knew that it was caused by the problem of privacy policy. The temporary solution is not to use the latest Gaode com.amap.api: location. The latest privacy policy is available. The best solution should be to access the latest policy, which has not been implemented

4. Solution

1. Find AutoNavi’s amap_location package according to the above path, in flutter/.pub-cache/hosted/…, and copy it after getting it, and change the latest dependency in android/build.gradle. At present, I Here is changed to 5.5.1


2. Delete the example in the package, create the local plug-in file plugins in the project, put the plug-in package into yaml, and import the local plug-in

Execute pub get, the error disappears, and the project can run

NC -lk 7777 Error: nc: invalid option –k [How to Solve]

Recently, I am learning Flink to simulate real-time data through NC. However, when you enter NC -lk 7777 under windows, the following error is reported:

C:\Users\7371>nc -lk 7777
nc: invalid option -- k
nc -h for help

After some searching, it was finally solved
windows is different from Linux. You can enter NC - L - P 7777 directly after CMD

[Solved] Android Project error: import android.support.v4 (V7). App.activitycompat

this is Chapter 18 of Android tutorial series. If you find it useful, you are welcome to follow the column

I: problem description

I got an Android project in 2018. The error message of a java file in the project is as follows

Error 1: Import android.support.v4.app.activitycompat

error 2: Import android.support.v7.app.appcompatactivity

The exception occurred when introducing Android support, because most Android projects now use Android x to replace the past Android support library, but it depends on the demand. Let’s talk about how to solve this problem on older Android projects.

II: solution

For error 1, copy the following line of code to replace the error reporting code

import android.support.v4.app.ActivityCompat;

For error 2, copy the following line of code instead of the error reporting code

import android.support.v7.app.AppCompatActivity;

Has your problem been solved? Welcome to leave a message in the comment area.


 

Conclusion

technology is accumulated bit by bit, and the great God can not be achieved in a day. Standing still is a step back, so make progress a little every day

finally, I attach a motto: “if you are eager to learn, if you are hungry, if you are humble, if you are stupid”. I hope we can encourage each other</ font>