Tag Archives: abnormal

[Solved] fatal: not in a git directory Error: Command failed with exit 128: git

fatal: not in a git directory Error: Command failed with exit 128: git

brew install cmake  execute error:

Already downloaded: /Users/kingcall/Library/Caches/Homebrew/downloads/b7ef8d6eb909e967d072212c62e71bfb8e94e6227ae2d3567bbabcc561fd9fff--cmake-3.21.4.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:c86a0bb0e37c293e2d4475519d28f2784c430e871f74969a1a2afeb64b540a7d
Already downloaded: /Users/kingcall/Library/Caches/Homebrew/downloads/1e8ca69a4444469a3f380baf4e514072d4d0f0b5d5ccd43b8ce3eb68081eff3d--cmake--3.21.4.arm64_monterey.bottle.tar.gz
fatal: not in a git directory
Error: Command failed with exit 128: git

The solution is as follows:

Running brew -v will give you two prompts to set the file paths for homebrew-cask and homebrew-core to safe.directory, i.e. using the following names.

Follow the prompts

git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask

Then executearch -arm64 brew install cocoapods will be OK!

If the above error is encountered, follow the prompts

git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-services

Then execute arch -arm64 brew install cocoapods again to succeed.

After successful execution, we execute our installation command againbrew install cmake

[Solved] Swagger Error: Whitelabel Error Page status=405

The swagger link is accessed with the following error

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Mar 17 20:14:30 CST 2022
There was an unexpected error (type=Method Not Allowed, status=405).
Request method ‘GET’ not supported

The reason is that @PostMapping does not have a configured path

   @PostMapping
    public UserInfoResponse queryUserNameById(@RequestBody UserInfoRequest request){
        log.info("Query user name request parameters",request);
        UserInfoResponse response = userService.selectUserNameById(request);
        log.info("Query user name return parameters",request);
        return response;
    }

[Solved] mmdetection benchmark.py Error: RuntimeError: Distributed package doesn‘t have NCCL built in

Cause:
use mmdetection’s tools/benchmark An error occurs when py calculates FPS
the error contents are as follows:

Traceback (most recent call last):
  File "tools/analysis_tools/benchmark.py", line 191, in <module>
    main()
  File "tools/analysis_tools/benchmark.py", line 183, in main
    init_dist(args.launcher, **cfg.dist_params)
  File "D:\Anaconda\envs\eagermot\lib\site-packages\mmcv\runner\dist_utils.py", line 18, in init_dist
    _init_dist_pytorch(backend, **kwargs)
  File "D:\Anaconda\envs\eagermot\lib\site-packages\mmcv\runner\dist_utils.py", line 32, in _init_dist_pytorch
    dist.init_process_group(backend=backend, **kwargs)
  File "D:\Anaconda\envs\eagermot\lib\site-packages\torch\distributed\distributed_c10d.py", line 510, in init_process_group
    timeout=timeout))
  File "D:\Anaconda\envs\eagermot\lib\site-packages\torch\distributed\distributed_c10d.py", line 597, in _new_process_group_helper
    raise RuntimeError("Distributed package doesn't have NCCL "
RuntimeError: Distributed package doesn't have NCCL built in

Cause analysis:
Windows does not support nccl backend

Solution:
1. Locate the following code location

File "D:\Anaconda\envs\eagermot\lib\site-packages\mmcv\runner\dist_utils.py", line 32, in _init_dist_pytorch

2. Add code before 1 (line 32)

backend='gloo'

[Solved] Swagger request error: error:getaddrinfo ENOTFOUND

Swagger request error: error: getaddrinfo enotfound

This is the problem I encountered. Maybe everyone encountered it in different ways. I just said the problems I encountered and my solutions
my problem is that when I create a new data table and put it in the test environment, the data table does not move to the test environment, so this error is reported:
solution: import the newly created data table in the test environment (formal environment), and the interface access is normal.

[Solved] A needed class was not found. This could be due to an error in your runpath. Missing class: scala/co

A needed class was not found. This could be due to an error in your runpath. Missing class: scala/collection/GenTraversableOnce$class
java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
	at com.twitter.util.JMapWrapper.<init>(LruMap.scala:33)
	at com.twitter.util.LruMap.<init>(LruMap.scala:41)
	at com.twitter.util.LruMap.<init>(LruMap.scala:44)
	at

pay attention to your POM file, confirm the version and some third-party dependent versions. Please use the newer version. Delete Idea, there may be some caches,

Domain error in object XXX “other” domain “other” rejected values and atm913

Question

When using the SSM framework for a project, the field error in object ‘xxx’ on field ‘xxx’: rejected value [[], [], []…] problem occurs.

resolvent

when the value passed from the front end is null, the value cannot be converted to the corresponding type, which will lead to loading

c

o

n

t

r

o

l

l

e

r

controller

The controller code reported an error before
for example:

u

r

l

:

url :

URL: ${pagecontext. Request. Contextpath}/book/toupdatepage/ ${book. Getbookid()}
if the red part is null, the field error in object ‘xxx’ on field ‘xxx’: rejected value [[], [], []…] problem will appear.

Therefore, to solve this problem, first check whether the value of the passed parameter is null, and then check whether the parameter type of the passed parameter is correct.

Docker starts MySQL container and reports an error driver failed programming external connectivity on endpoint mysq

Look at the error first:

The mistake is like the above. At first, I thought my command was wrong or something else, but later I found it was not

But it’s still troubleshooting one by one.
first, the command to create a MySQL container:
docker create – P 3306:3306 — name of the container – e mysql_ ROOT_ Password = database password MySQL version:

After creation, enter the command: docker PS – a
to view all containers

Then you can see the MySQL you just named

Start command:
docker start container ID

Then an error will be reported. If an error is reported, please see the following:

Problem solving:

The first is to restart the docker. It is useless for me to restart anyway. The restart command:
systemctl restart docker
it is also possible that you will be OK after restarting

The second is to view all containers through the docker PS – a command. If you have created MySQL before, when you create a MySQL container again, you need to change an external port, not 3306. Ensure that the port and name are different from the MySQL container created before

You can also use the previous MySQL container and start it directly through the docker start container ID

Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;

Report 400: data type mismatch:

    The type of time passed in the path URL is string

    You can add this annotation in the controller layer to convert string to java.util.date

    @DateTimeFormat(pattern = "yyyy-MM-dd") Date begin
    
       @GetMapping
          public List<Demand> listAll(@RequestParam("begin") @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam("end") @DateTimeFormat(pattern = "yyyy-MM-dd")Date endTime){
              System.out.println("beginTime"+beginTime);
              System.out.println("endTime:"+endTime);
              return demandClient.queryAllDemands(beginTime, endTime);
          }
      

      date begintime in the figure; If the front-end parameter is not begintime but begin, it needs to be defined as begin. in @ requestparam

      [Solved] ibatis.builder.BuilderException: Error parsing Mapper XML: Could not resolve type alias ‘XXX‘

      Error: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. : Could not resolve type alias ‘XXX’.

      Error Message:
      org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘com/huangmy3/community/dao/DiscussPostDao.xml’. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘DiscussPost’. Cause: java.lang.ClassNotFoundException: Cannot find class: DiscussPost

      Error reported means.
      Binding exception, the type (DiscussPostMap entity class) could not be found
      The reason is: The return type of the entity class should be resultMap

      修改后: