Category Archives: Error

[Solved] Android Error: import android.support.annotation.NonNull

I: problem description

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

import android.support.annotation.NonNull

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

Copy the following line of code to replace the error code

import androidx.annotation.NonNull;

Internalerror: GPU sync failed error (How to Solve)

1. Error reporting: (from Python deep learning p178-179)

When vscode runs the following code in Jupiter notebook, an error is reported: internalerror: GPU sync failed

from tensorflow.keras.models import Sequential
from tensorflow.keras import layers
from tensorflow.keras.optimizers import RMSprop

model = Sequential()
model.add(layers.Flatten(input_shape=(lookback // step, float_data.shape[-1])))
model.add(layers.Dense(32, activation='relu'))
model.add(layers.Dense(1))

model.compile(optimizer=RMSprop(), loss='mae')
history = model.fit_generator(train_gen,
                              steps_per_epoch=500,
                              epochs=20,
                              validation_data=val_gen,
                              validation_steps=val_steps)

2. Solution:

(1) Don’t open too many ipynb file windows. There is only one running window left. Restart and there should be no problem.

(2) Some friends said that they might have something to do with the wallpaper engine. Just turn it off. I haven’t verified this yet.

However, I found that when the wallpaper engine dynamic desktop is displayed, the GPU utilization will increase sharply:

Encapsulation SDK Call Error: runtime error [How to Solve]

In addition to accessing RTSP and gb28181, it also completes the docking with the equipment and video stream transmission through private protocols such as hiksdk and EHOME.

The client server deployed the easycvr project and crashed after running for a period of time. Open the log. The error message is as follows: “runtime error: invalid memory address or nil pointer dereference”.

This error is a typical error caused by the direct use of the go pointer without initializing the pointer after it is declared. See the addstream function in line 516 of the error information view code. The following code indicates that this function is the key to the error and is saved as the error file information, so this is not the key to the error.

Check the error message at line 606:

The parameters in line 606 represent: channel name, stream address, channel ID, handle using SDK, channelnum and stream type. Therefore, compared with the previous error message, it will be associated with the problem of calling the SDK handle. Then view the local. DB database for comparison:

Field Dahua_ device_ Handle has two values of 0 and – 1. All these two values are only available when login fails or errors occur. The program uses this value directly. This will cause the call to. DLL and. So to crash.

Before calling the SDK, make the following judgment when passing in the handle:

If loginHandle <=0 {
	Return -1, fmt.Errorf(“handle param error:%d”, loginHandle)
}

Or directly make if judgment in the encapsulated DLL. This is for double insurance.

if (loginHandle <= 0) {
	return -1;
}

MAC: How to Solve VirtualBox cannot open Issues

Mac solves the problem that VirtualBox cannot open and reports an error

You must specify a machine to start, using the command line.

Solution:

Open MAC terminal
1. cd to the directory where VBox is installed
2. VBoxManage list vms lists virtual machine directories
3. VirtualBoxVM –startvm (space) + the number of the virtual machine you want to open

So you can open it

Kafkaconsumer calls seek() method error [How to Solve]

When receiving the offset specified by calling the seek method in development, the following error is reported:

java.lang.IllegalStateException: No current assignment for partition xxx

Error reporting means that the partition does not have the offset you specified, but from the perspective of Kafka visualization tool, why is this error reported
originally, subscribe() and assign() are lazy – therefore, you need to make a “virtual call” to poll() before you can use seek().

R language: How to Solve DMwR Install Error

If the code is

install.packages("DMwR")

That may be the version of the installation package. Change to

install.packages("DMwR2")

want a go. The same is true when importing

library("DMwR2")

Specific process of error correction:

At first, I thought that the version of rstudio was not new enough. After updating rstudio, I found that it still couldn’t; Download rtools again, or report an error

The installation code of dmwr is as follows

install.packages("DMwR")

Error display

Warning in install.packages :
package ‘DMwR’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing -packages

(in fact, there is another error when downloading rtools and updating rstudio, but there is no screenshot,

Rtools is required to build R packages, but is not currently installed

Then try to change the installed image, Download rtools and update rstudio, and the error message becomes the above one)

I found the dmwr2 package by chance. I tried it and downloaded it successfully.

It is recommended to try dmwr2 first. If not, you can update rstudio and install rtools

Android studio does not prompt error messages [How to Solve]

Solution

1.After the as is upgraded, it is set to the power saving mode by default. If it is set to the power saving mode, the as will disable many auxiliary functions to achieve the purpose of power-saving. Therefore, automatic code prompt and error prompt are also prohibited.

Turn off power saving mode: File—> Remove the tick √ in front of power save mode

2.Your Android studio has installed the plug-in of butterknife. Open file — > Setting—> Plugins—> Find butterknife — > Right-click uninstall delete to uninstall and restart it. After restarting studio, open the project. It’s ok because now butterknife is no longer used. It is recommended to use viewbinding.

Sqoop connection gbase data error [How to Solve]

1. When sqoop accesses the gbase database through the command, the connection error is as follows:;

Just add the — driver parameter to the command

sqoop list-tables -connect jdbc: gbase://10.100.111.48:8010/dm -Driver com.gbase.jdbc.driver – username gbase – password gbase2010531
run successfully!

[Solved] NVIDIA driver error: NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver…

NVIDIA driver error reporting solution

Command line input

nvidia-smi

report errors:

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running

Solution 1:

Don’t rush to reinstall the NVIDIA driver. First check whether the security boot is disabled in the BIOS. If not, please enter the BIOS to disable the security boot!

Solution 2:

Confirm that the security boot is disabled, and then follow the online method:

    enter the Ubuntu advanced option and select the previous kernel version. If the previous method doesn’t work, reinstall the NVIDIA driver

[Solved] GP tool Call Error: ERROR 000824: The tool is not licensed.

Error reporting when calling GP tool

Last week, I wrote the code to call the two GP under esri.arcgis.datamanagementtools: createenterpriseodatabase and enableenterprise Geodatabase, that is, to create an enterprise database and convert the database into an enterprise database, but there are always errors. The error contents are as follows:

Executing: EnableEnterpriseGeodatabase
Start Time: Mon Nov 15 14:19:41 2021
Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (EnableEnterpriseGeodatabase).
Failed at Mon Nov 15 14:19:41 2021 (Elapsed Time: 0.00 seconds)

When I manually execute the tool by using the tool in the toolbox provided by ArcGIS, the execution is successful. The execution parameters are as like as two peas, but the code execution is not a problem. Later, it was found that it was an authorization problem. The following permission initialization code was added to the code constructor or loading event. The problem was solved perfectly.

ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop, ESRI.ArcGIS.LicenseLevel.GeodatabaseUpdate);