Tag Archives: bug

[Solved] RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cubla…

Resolve runtime error: CUDA error: cublas_STATUS_EXECUTION_FAILED when calling `cubla…

The running experiment encountered this problem. At the beginning, it was found that some people said it was because the dimensions might be different, but after inspection, this problem did not exist.

Another solution is to add a sentence of code

torch.backends.cudnn.enabled = false , but I haven’t tried yet, because it is found that the CUDA device settings of the main.py file and other files are different (there is not much data, I didn’t set nn.dataparallel, so there will be no problem after the changes are consistent.

Therefore, if you encounter this problem, you can check whether each variable and model are on the same CUDA device.

Error starting ApplicationContext. To display the conditions report re-run your application with ‘de

Error starting ApplicationContext. To display the conditions report re run your application with ‘debug’ enabled.
without much talking, go straight to the figure above (this may be the reason why the editor encountered the bug)

for details, see the description above: when mapper or service
solution:
(reason: your mapper is not scanned when springboot starts)
method 1: add your mapper package address in the core control class

(reason: it is not scanned to the service layer)
method 2: do not add service annotation

Can solve the above problems

[PX4 Bug] make px4_sitl gazebo Error: CMake Error: The following variables are used in this project

Article catalog

1. Preface 2. Bug 12.1 error reporting output 2.2 solutions 2.3 reference link

3. Bug 23.1 error output 3.2 solution

4. Bug 34.1 error reporting output 4.2 solution 4.3 reference link

1. Preface

When executing make Px4_ When sitl gazebo , an error is reported.

2. Bug 1

2.1 error output

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GSTREAMER_LIBRARIES (ADVANCED)
    linked by target "gazebo_uuv_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_user_camera_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_groundtruth_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_sonar_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_lidar_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_camera_manager_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_opticalflow_mockup_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "mav_msgs" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "nav_msgs" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "std_msgs" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_opticalflow_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_airspeed_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_airship_dynamics_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_controller_interface" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "sensor_msgs" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_vision_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_gimbal_controller_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_imu_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "physics_msgs" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_wind_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_mavlink_interface" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_motor_model" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_catapult_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_multirotor_base_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_magnetometer_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_usv_dynamics_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_barometer_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_parachute_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_drop_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_gst_camera_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_irlock_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_gps_plugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "gazebo_video_stream_widget" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo
    linked by target "LiftDragPlugin" in directory /home/zth/PX4-Autopilot/Tools/sitl_gazebo

-- Configuring incomplete, errors occurred!
See also "/home/zth/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeOutput.log".
See also "/home/zth/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeError.log".
[217/819] Linking CXX static library s...lib/mixer/SimpleMixer/libSimpleMixer.a
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure 
cd /home/zth/PX4-Autopilot/build/px4_sitl_default/build_gazebo && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_ODOMETRY_DATA=ON -DGENERATE_ROS_MODELS=ON -GNinja /home/zth/PX4-Autopilot/Tools/sitl_gazebo && /usr/bin/cmake -E touch /home/zth/PX4-Autopilot/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
[227/819] Building CXX object src/lib/...MakeFiles/ecl_EKF.dir/EKFGSF_yaw.cpp.o
ninja: build stopped: subcommand failed.
Makefile:226: recipe for target 'px4_sitl' failed
make: *** [px4_sitl] Error 1

2.2 solutions

sudo apt install libgstreamer1.0-dev
sudo apt install gstreamer1.0-plugins-good
sudo apt install gstreamer1.0-plugins-bad
sudo apt install gstreamer1.0-plugins-ugly

2.3 reference links

[1] https://github.com/PX4/PX4-Autopilot/issues/13416

3. Bug 2

3.1 error output

VMware: vmw_ioctl_command error Invalid argument.

3.2 solutions

[1] Run gazebo under the virtual machine, about vmw_ ioctl_ Command error invalid argument error

4. Bug 3

4.1 error output

[Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
[Err] [REST.cc:205] Error in REST request

libcurl: (51) SSL: no alternative certificate subject name matches target host name 'api.ignitionfuel.org'

4.2 Solution
Modify https://api.ignitionfuel.org in ~/.ignition/fuel/config.yaml to https://api.ignitionrobotics.org , it’s OK

Solution to parse error at “IID” reported by QT

1. Environment

deepin v20.2.3
Qt5.14.2

2. Error log

Parse error at "IID"

3. Solutions

A lot of people on the Internet say that the supplementary constructor code is invalid after trying. Finally, it was found that the installation Qt5 private header file was missing, which was compiled after installation.

sudo apt install qtbase5-private-dev

4. Reference

Try to build QT
Qt5 plug-in file for Linux system

A cross-origin error was thrown. React doesn‘t have access to the actual error object in development

A cross origin error was throw. React doesn’t have access to the actual error object in development

I ran the react project in the morning. I read the reason on the Internet and learned that there was a problem with the package, which led me to delete the package several times without solving it. Finally, delete the package and then clear the cache of the package with the instruction. The package downloaded with the yarn instruction solves this problem

[How to Solve] ffprobe ‘***: No such file or directory‘

Error reporting solution: ffprobe ‘* * *: no such file or directory’

Explain the error message solution

explain

This blog is used to record the solution to the error reported by ffprobe when I use the splieter open source music separation tool on the Linux server.

Error message

Traceback (most recent call last):
  File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/spleeter/audio/ffmpeg.py", line 101, in load
    probe = ffmpeg.probe(path)
  File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/ffmpeg/_probe.py", line 23, in probe
    raise Error('ffprobe', out, err)
ffmpeg._run.Error: ffprobe error (see stderr output for detail)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test_spleeter.py", line 9, in <module>
    separate(sys.argv[1], sys.argv[2], sys.argv[3])
  File "test_spleeter.py", line 7, in separate
    separator.separate_to_file(test_files[0], pre_dir)
  File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/spleeter/separator.py", line 380, in separate_to_file
    sample_rate=self._sample_rate,
  File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/spleeter/audio/ffmpeg.py", line 105, in load
    e.stderr.decode()
spleeter.SpleeterError: An error occurs with ffprobe (see ffprobe output below)

ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100/56. 31.100
  libavcodec     58. 54.100/58. 54.100
  libavformat    58. 29.100/58. 29.100
  libavdevice    58.  8.100/58.  8.100
  libavfilter     7. 57.100/ 7. 57.100
  libavresample   4.  0.  0/ 4.  0.  0
  libswscale      5.  5.100/ 5.  5.100
  libswresample   3.  5.100/ 3.  5.100
  libpostproc    55.  5.100/55.  5.100
u: No such file or directory

Solution

    1. background description
  1. When I first saw the error message, it was inexplicable. Because there was no problem when testing directly locally, in order to let others try it later, I used the Flask framework to encapsulate Spleeter into a small web page to display it, but this error was reported.

    Search directly online from the beginning ffprobe No such file or directory, The solutions found are basically saying that ffmpeg or ffprobe is not installed, but these two tools have indeed been installed here. After searching for a long time, the problem has not been solved, and then I found a similar error on Spleeter Github Issues #364 .

(base) C:\Users\smcco>python -m spleeter separate -i C:\Users\smcco\Music\Power Rangers Time Force Theme.mp3 -p spleeter:5stems -o output
ERROR:spleeter:An error occurs with ffprobe (see ffprobe output below)

ffprobe version 4.2 Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100/56. 31.100
  libavcodec     58. 54.100/58. 54.100
  libavformat    58. 29.100/58. 29.100
  libavdevice    58.  8.100/58.  8.100
  libavfilter     7. 57.100/ 7. 57.100
  libswscale      5.  5.100/ 5.  5.100
  libswresample   3.  5.100/ 3.  5.100
  libpostproc    55.  5.100/55.  5.100
C:\Users\smcco\Music\Power: No such file or directory

No solution was found through this, but I was inspired to think that the absolute path should be used, so I set the path to the absolute path. The error is still not solved, but an error message is changed:

Traceback (most recent call last):
  File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/spleeter/audio/ffmpeg.py", line 101, in load
    probe = ffmpeg.probe(path)
  File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/ffmpeg/_probe.py", line 23, in probe
    raise Error('ffprobe', out, err)
ffmpeg._run.Error: ffprobe error (see stderr output for detail)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test_spleeter.py", line 9, in <module>
    separate(sys.argv[1], sys.argv[2], sys.argv[3])
  File "test_spleeter.py", line 7, in separate
    separator.separate_to_file(test_files[0], pre_dir)
  File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/spleeter/separator.py", line 380, in separate_to_file
    sample_rate=self._sample_rate,
  File "~/miniconda3/envs/spleeter/lib/python3.6/site-packages/spleeter/audio/ffmpeg.py", line 105, in load
    e.stderr.decode()
spleeter.SpleeterError: An error occurs with ffprobe (see ffprobe output below)

ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100/56. 31.100
  libavcodec     58. 54.100/58. 54.100
  libavformat    58. 29.100/58. 29.100
  libavdevice    58.  8.100/58.  8.100
  libavfilter     7. 57.100/ 7. 57.100
  libavresample   4.  0.  0/ 4.  0.  0
  libswscale      5.  5.100/ 5.  5.100
  libswresample   3.  5.100/ 3.  5.100
  libpostproc    55.  5.100/55.  5.100
/: Is a directory

At this time, I realized! ! !There is a problem with the file path that I passed in by myself!

Cause analysis

Review the last line of the error message:u: No such file or directory, Which is expressing:There is no file or directory named u. I always thought that u was a specific prefix reported by ffprobe, but only now I discovered that it refers to the file name that was not found.

It turns out that the file name to be separated in my code to Spleeter should be test_files, not test_files[0]. The reason why I used more [0] is because at the beginning, the default test_files represents a list of file names. There is only one time, just take the first one, but the Flask framework just forgot to do it. In the end, a file name was directly assigned to test_files instead of a list.

At this point, if we look at the error message on Spleeter Github Issues #364 , we will find that this error is also caused by a problem with the input file name. There are spaces in the input file name, which directly leads to multiple parameters in the command line. Instead of a complete path.

Concrete steps

Modify the correct file path name passed to Spleeter.

Python calendar.month() Error [How to Solve]

When calling calendar.month today, an error is reported. The
code is as follows

import calendar

yy=int(input("year:"))
mm=int(input("month:"))
print(calendar.month(yy,mm))

The error report is shown in the figure below

look at the yellow part circled in the figure. Circular import may be circular. You can see that the program file name is calendar.py, which is consistent with the introduced calendar, so it causes an error.

Solution
just modify the file name, which cannot have the same name as the imported package

Java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver [How to Solve]

Java.lang.classnotfoundexception: sun.jdbc.odbc.jdbcodbcdriver error reporting solution

Error report description problem description cause analysis solution operation results

Error reporting description

java.lang.classnotfoundexception: sun.jdbc.odbc.jdbcodbcdriver reports an error


Problem description

when learning the contents of Java database, because the old version of teaching materials are used, and the Java version has been updated and some functions have been deleted, an error message prompted by java.lang.classnotfoundexception: sun.jdbc.odbc.jdbcodbcdriver appears when reading the database: 

try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        } catch (ClassNotFoundException e) {
            System.out.println(e);
        }

Error message: java.lang.classnotfoundexception: sun.jdbc.odbc.jdbcodbcdriver


Cause analysis

since JDK1.8, the JDBC ODBC bridge has been deleted, so the ODBC driver cannot be used </ font>


Solution

 

    1. Step 1: install the old version of JDK. I install the download link of version 1.7 here: just click the next step for the jdk1.7 installation step. Step 2: change the Java environment

 

    1. friends using eclipse can refer to this blog:

 

    1. java.lang.classnotfoundexception: sun.jdbc.odbc.jdbcodbcodbcdriver solution 2.1 I use the integrated development environment of idea, The method is as follows:

 

    1. in file – project structure

    1. in project settings, select the JDK version downloaded for you by project SDK (here is 1.7)

 

    1. and click apply to run


Operation results

run smoothly ^ ^

Interpreter error /com.fasterxml.jackson.databind.JavaType

In the process of rabbitmq docking, after importing the jar package, errors such as mismatch of jar package version and lack of method are reported during compilation;

Processing method: import the missing jar package

<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-annotations</artifactId>
  <version>2.9.7</version>
</dependency>
<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-databind</artifactId>
  <version>2.9.8</version>
</dependency>
<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-core</artifactId>
  <version>2.9.8</version>
</dependency>

Solve the problem of error reporting from scipy.misc import imread & imresize in Python

from scipy.misc import imread& imresize

Problem description solution 1 solution 2

Problem description

from scipy.misc import imread # error

After query, the reason is that the from scipy.misc import imread, imwrite and other methods have been abandoned, and python has encapsulated the imread method in the imageio module

Solution 1

To install the imageio Library:

pip install imageio 

Normal use!

import imageio
imageio.imread("xxxx.png")

Solution 2

If the higher version is discarded, we can reduce the SciPy version!

Reduce the SciPy version to 1.2.1

pip install scipy==1.2.1

Python scatter chart error: TypeError: object of type ‘NoneType’ has no len()

housing.plot(kind="scatter", x="longitude", y="latitude", alpha=0.4,
             s=housing["population"]/100, label="population", figsize=(10,7),
             c="median_house_value", cmap=plt.get_cmap("jet"), colorbar=True,
             sharex=False)
plt.legend()

TypeError: object of type ‘NoneType’ has no len()

After removing label =’population ‘, the picture can be displayed

but a new warning appears

No handles with labels found to put in legend.

I didn’t finish the adjustment for two hours until I updated Matplotlib:) it is OK.