Tag Archives: error

The NPF driver isn’t running. You may have trouble capturing or listing interfaces

The processing method of “the NPF driver isn’t running. You may have trouble capturing or listing interfaces (as shown)” appears in Wireshark packet capturing tool


First of all, you have to make sure that you have installed WinPcap (it’s better to download the latest version: official download, which seems to be unable to be opened by the official, and it can also be downloaded by the Chinese Army)

a. If you are using Linux or Ubuntu, please use & gt$ The Su administrator command switches to the account with the highest authority, and then enters the command: “net start NPF” (if not, find a similar command yourself). b. If you are using Windows XP/me, please use the administrator account to log in, open CMD, and enter the command: “net start NPF”. You will be prompted to open the driver service successfully. c. If you are using Windows Vista or windows 7 that I tried out, please find the file cmd.exe under “C::?Windows?System32”, right-click and select “run as administrator”, and then enter the command “net start NPF” in the command line mode to successfully open the NPF driver. It should be that the npf.sys file I found earlier has been opened.


Finally, turn on Wireshark again, and “bingo” will work normally.

See

MOTR compiling error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_R

Key error information

/usr/local/include/c++/8.2.0/bits/basic_string.tcc:1067:1: error: cannot call member function 'void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char32_t; _Traits = std::
char_traits<char32_t>; _Alloc = std::allocator<char32_t>]' without object
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1423, in _run_ninja_build
    check=True)
  File "/home/miniconda3/envs/motr/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

Solution:

/usr/local/include/c++/8.2.0/bits/basic_string.tcc Line 1067

__p->_M_set_sharable();

Change to:

(*__p)._M_set_sharable();

Attachment: the overall error report is as follows

which: no hipcc in (/home/miniconda3/envs/motr/bin:/home/miniconda3/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/bin:/usr/bin:/home/bin:/usr/local/sbin:/usr/sbin)
running build
running build_py
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/functions
copying functions/__init__.py -> build/lib.linux-x86_64-3.7/functions
copying functions/ms_deform_attn_func.py -> build/lib.linux-x86_64-3.7/functions
creating build/lib.linux-x86_64-3.7/modules
copying modules/__init__.py -> build/lib.linux-x86_64-3.7/modules
copying modules/ms_deform_attn.py -> build/lib.linux-x86_64-3.7/modules
running build_ext
building 'MultiScaleDeformableAttention' extension
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/nfs
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/nfs/volume-95-4
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/nfs/volume-95-4/liushuai
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops/src
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops/src/cpu
creating /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops/src/cuda
/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/utils/cpp_extension.py:220: UserWarning:

                               !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using c++, and then you can also use
c++ to compile your extension.

See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                              !! WARNING !!

  platform=sys.platform))
Emitting ninja build file /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/3] c++ -MMD -MF /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops/src/cpu/ms_deform_attn_cpu.o.d -pthread -B /home/miniconda3/envs/motr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/github/MOTR/models/ops/src -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/TH -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/miniconda3/envs/motr/include/python3.7m -c -c /github/MOTR/models/ops/src/cpu/ms_deform_attn_cpu.cpp -o /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops/src/cpu/ms_deform_attn_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=MultiScaleDeformableAttention -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
[2/3] c++ -MMD -MF /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops/src/vision.o.d -pthread -B /home/miniconda3/envs/motr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/github/MOTR/models/ops/src -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/TH -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/miniconda3/envs/motr/include/python3.7m -c -c /github/MOTR/models/ops/src/vision.cpp -o /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops/src/vision.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=MultiScaleDeformableAttention -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from /github/MOTR/models/ops/src/vision.cpp:11:
/github/MOTR/models/ops/src/ms_deform_attn.h: In function 'at::Tensor ms_deform_attn_forward(const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, int)':
/github/MOTR/models/ops/src/ms_deform_attn.h:29:20: warning: 'at::DeprecatedTypeProperties& at::Tensor::type() const' is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many ca
ses (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead
and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
     if (value.type().is_cuda())
                    ^
In file included from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:11,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/extension.h:4,
                 from /github/MOTR/models/ops/src/cpu/ms_deform_attn_cpu.h:12,
                 from /github/MOTR/models/ops/src/ms_deform_attn.h:13,
                 from /github/MOTR/models/ops/src/vision.cpp:11:
/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here
   DeprecatedTypeProperties & type() const {
                              ^~~~
In file included from /github/MOTR/models/ops/src/vision.cpp:11:
/github/MOTR/models/ops/src/ms_deform_attn.h: In function 'std::vector<at::Tensor> ms_deform_attn_backward(const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const
at::Tensor&, int)':
/github/MOTR/models/ops/src/ms_deform_attn.h:51:20: warning: 'at::DeprecatedTypeProperties& at::Tensor::type() const' is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many ca
ses (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead
and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
     if (value.type().is_cuda())
                    ^
In file included from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:11,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
                 from /home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/torch/extension.h:4,
                 from /github/MOTR/models/ops/src/cpu/ms_deform_attn_cpu.h:12,
                 from /github/MOTR/models/ops/src/ms_deform_attn.h:13,
                 from /github/MOTR/models/ops/src/vision.cpp:11:
/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:262:30: note: declared here
   DeprecatedTypeProperties & type() const {
                              ^~~~
[3/3] /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/github/MOTR/models/ops/src -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/i
nclude/torch/csrc/api/include -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/TH -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/
home/miniconda3/envs/motr/include/python3.7m -c -c /github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.cu -o /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops/src/cuda/ms_deform_attn
_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -
D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=MultiScaleDeformableAttention -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61
-std=c++14
FAILED: /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.o
/usr/local/cuda/bin/nvcc -DWITH_CUDA -I/github/MOTR/models/ops/src -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include
/torch/csrc/api/include -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/TH -I/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/m
iniconda3/envs/motr/include/python3.7m -c -c /github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.cu -o /github/MOTR/models/ops/build/temp.linux-x86_64-3.7/github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.
o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUD
A_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=MultiScaleDeformableAttention -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c
++14
/github/MOTR/models/ops/src/cuda/ms_deform_im2col_cuda.cuh(261): warning: variable "q_col" was declared but never referenced
          detected during instantiation of "void ms_deformable_im2col_cuda(cudaStream_t, const scalar_t *, const int64_t *, const int64_t *, const scalar_t *, const scalar_t *, int, int, int, int, int, int, i
nt, scalar_t *) [with scalar_t=double]"
/github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.cu(64): here

/github/MOTR/models/ops/src/cuda/ms_deform_im2col_cuda.cuh(762): warning: variable "q_col" was declared but never referenced
          detected during instantiation of "void ms_deformable_col2im_cuda(cudaStream_t, const scalar_t *, const scalar_t *, const int64_t *, const int64_t *, const scalar_t *, const scalar_t *, int, int, int
, int, int, int, int, scalar_t *, scalar_t *, scalar_t *) [with scalar_t=double]"
/github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.cu(134): here

/github/MOTR/models/ops/src/cuda/ms_deform_im2col_cuda.cuh(872): warning: variable "q_col" was declared but never referenced
          detected during instantiation of "void ms_deformable_col2im_cuda(cudaStream_t, const scalar_t *, const scalar_t *, const int64_t *, const int64_t *, const scalar_t *, const scalar_t *, int, int, int
, int, int, int, int, scalar_t *, scalar_t *, scalar_t *) [with scalar_t=double]"
/github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.cu(134): here

/github/MOTR/models/ops/src/cuda/ms_deform_im2col_cuda.cuh(331): warning: variable "q_col" was declared but never referenced
          detected during instantiation of "void ms_deformable_col2im_cuda(cudaStream_t, const scalar_t *, const scalar_t *, const int64_t *, const int64_t *, const scalar_t *, const scalar_t *, int, int, int
, int, int, int, int, scalar_t *, scalar_t *, scalar_t *) [with scalar_t=double]"
/github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.cu(134): here

/github/MOTR/models/ops/src/cuda/ms_deform_im2col_cuda.cuh(436): warning: variable "q_col" was declared but never referenced
          detected during instantiation of "void ms_deformable_col2im_cuda(cudaStream_t, const scalar_t *, const scalar_t *, const int64_t *, const int64_t *, const scalar_t *, const scalar_t *, int, int, int
, int, int, int, int, scalar_t *, scalar_t *, scalar_t *) [with scalar_t=double]"
/github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.cu(134): here

/github/MOTR/models/ops/src/cuda/ms_deform_im2col_cuda.cuh(544): warning: variable "q_col" was declared but never referenced
          detected during instantiation of "void ms_deformable_col2im_cuda(cudaStream_t, const scalar_t *, const scalar_t *, const int64_t *, const int64_t *, const scalar_t *, const scalar_t *, int, int, int
, int, int, int, int, scalar_t *, scalar_t *, scalar_t *) [with scalar_t=double]"
/github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.cu(134): here

/github/MOTR/models/ops/src/cuda/ms_deform_im2col_cuda.cuh(649): warning: variable "q_col" was declared but never referenced
          detected during instantiation of "void ms_deformable_col2im_cuda(cudaStream_t, const scalar_t *, const scalar_t *, const int64_t *, const int64_t *, const scalar_t *, const scalar_t *, int, int, int
, int, int, int, int, scalar_t *, scalar_t *, scalar_t *) [with scalar_t=double]"
/github/MOTR/models/ops/src/cuda/ms_deform_attn_cuda.cu(134): here

/usr/local/include/c++/8.2.0/bits/basic_string.tcc: In instantiation of 'static std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<
_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>; std
::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]':
/usr/local/include/c++/8.2.0/bits/basic_string.tcc:578:28:   required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterat
or_tag) [with _FwdIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]'
/usr/local/include/c++/8.2.0/bits/basic_string.h:5043:20:   required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::__false_typ
e) [with _InIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]'
/usr/local/include/c++/8.2.0/bits/basic_string.h:5064:24:   required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator =
const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]'
/usr/local/include/c++/8.2.0/bits/basic_string.tcc:656:134:   required from 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, cons
t _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]'
/usr/local/include/c++/8.2.0/bits/basic_string.h:6716:95:   required from here
/usr/local/include/c++/8.2.0/bits/basic_string.tcc:1067:1: error: cannot call member function 'void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char16_t; _Traits = std::
char_traits<char16_t>; _Alloc = std::allocator<char16_t>]' without object
       __p->_M_set_sharable();
 ^     ~~~~~~~~~
/usr/local/include/c++/8.2.0/bits/basic_string.tcc: In instantiation of 'static std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<
_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std
::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]':
/usr/local/include/c++/8.2.0/bits/basic_string.tcc:578:28:   required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterat
or_tag) [with _FwdIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]'
/usr/local/include/c++/8.2.0/bits/basic_string.h:5043:20:   required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::__false_typ
e) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]'
/usr/local/include/c++/8.2.0/bits/basic_string.h:5064:24:   required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator =
const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]'
/usr/local/include/c++/8.2.0/bits/basic_string.tcc:656:134:   required from 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, cons
t _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]'
/usr/local/include/c++/8.2.0/bits/basic_string.h:6721:95:   required from here
/usr/local/include/c++/8.2.0/bits/basic_string.tcc:1067:1: error: cannot call member function 'void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char32_t; _Traits = std::
char_traits<char32_t>; _Alloc = std::allocator<char32_t>]' without object
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1423, in _run_ninja_build
    check=True)
  File "/home/miniconda3/envs/motr/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 70, in <module>
    cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/home/miniconda3/envs/motr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/miniconda3/envs/motr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/miniconda3/envs/motr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/miniconda3/envs/motr/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/miniconda3/envs/motr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/miniconda3/envs/motr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
    _build_ext.run(self)
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/home/miniconda3/envs/motr/lib/python3.7/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 603, in build_extensions
    build_ext.build_extensions(self)
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
    _build_ext.build_ext.build_extensions(self)
  File "/home/miniconda3/envs/motr/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/home/miniconda3/envs/motr/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/miniconda3/envs/motr/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
    depends=ext.depends)
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 437, in unix_wrap_ninja_compile
    with_cuda=with_cuda)
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1163, in _write_ninja_file_and_compile_objects
    error_prefix='Error compiling objects for extension')
  File "/home/miniconda3/envs/motr/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1436, in _run_ninja_build
    raise RuntimeError(message)
RuntimeError: Error compiling objects for extension

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

NoClassDefFoundError: org/codehaus/jackson/map/ObjectMapper

Problem solving:

o.s.b.w.s.support.ErrorPageFilter - Forwarding to error page from request 
[/marketing/fastRide] due to exception [org/codehaus/jackson/map/ObjectMapper] 
java.lang.NoClassDefFoundError: org/codehaus/jackson/map/ObjectMapper

Cause of the problem:
there is a conflict between the imported version of jeckson jar and the version of jeckson introduced by other jars
or there is no imported version of jeckson
solution:
introduce this version of jeckson jar

<dependency>
   <groupId>org.codehaus.jackson</groupId>
   <artifactId>jackson-mapper-asl</artifactId>
   <version>1.9.2</version>
</dependency>
<dependency>
   <groupId>org.codehaus.jackson</groupId>
   <artifactId>jackson-core-asl</artifactId>
   <version>1.9.2</version>
</dependency>

[Solved] Could not find resource COM / atguigu / Dao / studentdao.xm, the mapper file for storing SQL statements could not be found and an error occurred

The mapper file created by using the Maven project mybatis to operate the database is not put under the resource resource file. The following error occurs during compilation

org.apache.ibatis.exceptions.PersistenceException: 
### Error building SqlSession.
### The error may exist in com\atguigu\dao\StudentDao.xml
### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com\atguigu\dao\StudentDao.xml

	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:80)
	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:64)
	at com.atguigu.Test1.test01(Test1.java:23)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com\atguigu\dao\StudentDao.xml
	at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:121)
	at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:98)
	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:78)
	... 24 more
Caused by: java.io.IOException: Could not find resource com\atguigu\dao\StudentDao.xml
	at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:114)
	at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:100)
	at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:371)
	at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:119)
	... 26 more



This is because the dao.xml file under the mapper file can not find the statement file to operate the database during compilation. There are two solutions to the problem.
the first one is to put the file to store the database statement under the resource file. Remember to modify the mybatis main configuration file

 	 <mappers>
        <mapper resource="com\zixi\dao\StudentDao.xml"/>
    </mappers>

    <!--    Modify your path directly to the following-->

    <mappers>
    <mapper resource="StudentDao.xml"/>
</mappers>
    

If you don’t want to modify and copy, you can directly add the Blid tag under the Maven configuration file and add the following content

  <build>
<!--        To solve the problem of writing sql statements in main.com.**. file, but when compiling, the xmlsql file error does not appear in out-->
        <resources>
            <resources>
                <directory>src/main/java</directory><! --directory where -->
                <includes><! --Includes directories where .properties, .xml files are scanned -->
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>
    </build>

This is my own practice problems, the above content can only be used as a reference, hope to be useful to you. thank you

JDK installation exception link it with ‘- Z noexecstack’ and inux 64 bit zendguardloader.so: wrong elf class: elfclass32 error handling

N1.
It’s highly recommended that you fix the library with ‘execstack -c <libfile>’, or link it with ‘-z noexecstack’.
It means that it is recommended to use sunjdk instead of linux’s own openjdk

N2.linux 64bit system ZendGuardLoader.so: wrong ELF class: ELFCLASS32 error
1. Download Zend Guard
32位 http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
64位 http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
mkdir /usr/local/zend
tar -zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
sudo cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php5.3.x/ZendGuardLoader.so /usr/local/zend/
2. Set
vim /etc/php.ini
Finally add.
zend_extension=/usr/local/zend/ZendGuardLoader.so
The reason for the above error is that the 64-bit system is using the 32-bit ZendGuardLoader.so.
The solution is to download a 64-bit ZendGuardLoader.so file that corresponds to the PHP version
1、Download Zend Guard
32位 http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
64位 http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
mkdir /usr/local/zend
tar -zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
sudo cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php5.3.x/ZendGuardLoader.so /usr/local/zend/
2. Set
vim /etc/php.ini
Finally Add:
zend_extension=/usr/local/zend/ZendGuardLoader.so

[Solved] In case of “transactionmanager” while setting bean property “transactionmanager” error

When learning to write XML transactions in spring, you can refer to ‘transactionmanager’ while setting bean property ‘transactionmanager’

Warning: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in file [D:\Codeworkstation\IDEAGuigu\Spring5\spring5_tedemo1\out\production\spring5_tedemo1\com\atgui\spring\service\UserService.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txadvice': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' available

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in file [D:\Codeworkstation\IDEAGuigu\Spring5\spring5_tedemo1\out\production\spring5_tedemo1\com\atgui\spring\service\UserService.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txadvice': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' available

XML configuration transaction code

 <!-- Create the transaction manager - >
    <bean id="dataSourceTransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<! -- Inject data source -- >
        <property name="dataSource" ref="dataSource"></property>
    </bean>

    <! -2 Configuration Notifications-->
    <tx:advice id="txadvice">
        <! -- Configure transaction parameters -->
        <tx:attributes>
            <! -- Specify which rule's method to add a transaction on top of -->
            <tx:method name="account" propagation="REQUIRED"/>
            <! --<tx:method name="account*"/>-->
        </tx:attributes>
    </tx:advice>

    <! -3 Configuring entry points and cut-planes -->
    <aop:config>
        <! -- Configure entry points -->
        <aop:pointcut id="pt" expression="execution(* com.atgui.spring.service.UserService.*(...))" />
        <! --configuration cutscene ->
        <aop:advisor advice-ref="txadvice" pointcut-ref="pt"/>
    </aop:config>

Service layer code

@Service
//@Transactional
public class UserService {

    @Autowired
    private UserDao userDao;

    public void account(){

        //Reduce money
        userDao.reducemo();
        int i=13/0;
        //Increase money
        userDao.addmo();
    }
}

The above error appears when running

You can modify the error code section in XML

 <!-- Creating a Transaction Manager-->
    <bean id="dataSourceTransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<!--        Injecting data sources-->
        <property name="dataSource" ref="dataSource"></property>
    </bean>

Change the above id = “datasourcetransactionmanager” to id = “transactionmanager”\

That’s it

    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<!--        Injecting data sources-->
        <property name="dataSource" ref="dataSource"></property>
    </bean>
``

This will solve the above problem


[Solved] Echarts Error: There is a chart instance already initialized on the dom!

On the current page, when you execute charts drawing for many times, the console will give a warning “there is a chart instance already initialized on the DOM”, which means: “a chart instance has been initialized on the DOM”

Solution:

Add the method of drawing ecarts to judge whether it already exists. If it exists, it can be destroyed. The code example is as follows:

data() {
	return {
		myRingChart1:null
	}
}
drawRing1() {
      if (
        this.myRingChart1 != null &&
        this.myRingChart1 != '' &&
        this.myRingChart1 != undefined
      ) {
        this.myRingChart1.dispose() //Solve the error reported by echarts dom already loaded
      }
      // Initialize the echarts instance based on the prepared dom
      this.myRingChart1 = echarts.init(this.$refs['myRingChart1'])
}

[Solved] Git Error: OpenSSL SSL_read: Connection was reset, errno 10054和Failed to connect to github.com port 443

Question 1: OpenSSL_ read: Connection was reset, errno 10054

When using git to upload your own project, an error will be reported:

Cause of the problem

openssl ssl_ Read: connection reset, errno 10054

This is the SSL certificate of the server that has not been signed by a third party, so an error is reported.

This error is most likely caused by network instability and connection timeout. If you try again, you will still report an error.

Problem solving methods

Method 1

First, check whether the IP corresponding to the domain name of GitHub in the host file of Disk C is correct. If not, query the correct IP https://www.ipaddress.com/

If there is no problem with the IP address, upload it several times.

Method 2

If method one doesn’t work, modify the settings and remove SSL verification
Enter git bash here

Input

git config --global http.sslVerify "false"

At this point, the GIT operation can be executed again

if prompted:

fatal: not in a git directory

Then do it first

git init

Re input:

git config http.sslVerify "false"

Q2: failed to connect to github.com port 443: timed out

When using git push - U origin main to upload an item, another injury occurred:

Cause of the problem

Network problems or agency problems

Problem solving methods

It is found that there is no problem with the network, and the GitHub can be accessed normally,

reference material: https://blog.csdn.net/hustsselbj/article/details/46842191?utm_ medium=distribute.pc_ relevant_ t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase& depth_ 1-utm_ source=distribute.pc_ relevant_ t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase

It is the problem of agency

Uncheck proxy server and use automatic detection settings

And then git push - U origin main , it’s successful.

Error when manipulating files: zipfile.BadZipFile: File is not a zip file

When writing code, the recorder pursues decoupling, and wants the program to see if the path file exists. The OS module is usually used to operate the file or path. If it does not exist, the file is created under the current path for subsequent operations. As far as I know, the OS module does not give a method to create a file, which requires us to complete the “road safety first” through another way. At that time, we used the general with open to create a file. OK, no problem. The creation was successful. The next problem is the error of zipfile.badzipfile: file is not a zip file during data storage, It’s said that the file that is not zip is rushing to work. Suddenly, it’s a flash of inspiration. When the pandas module is used, it’s just that the file can be operated. In the end, the overall code has not changed. The only change is to attach the code at the step of creating the file

def isfile(self, file):
        print(file)
        if not os.path.isfile(file):
            df = pd.DataFrame(columns=['name', 'shake number', 'weibo', 'profile', 'estimated sales']) # Create a table object, without creating the content first
            df.to_excel(self.filr, index=False) # Save the object as an .xlsx file
        return file

Call the function to execute retuan and return the path URL for subsequent operation