Category Archives: Error

[Solved] dyld: Library not loaded: /System/Library/Frameworks/Network.framework/Network

Question:

Today’s test brought a low version of iPhone. I ran the project with it and reported the following errors
dyld: Library not loaded: /System/Library/Frameworks/Network.framework/Network
Referenced from: /var/containers/Bundle/Application/CD697C3E-135B-4A33-BA7B-D95D33E24070/巨折.app/巨折

Solution:

Follow the prompts and go to Build Phases -> Link Binary With Libraries and add Network.framework

After running it still reports the same error, then you need to go to Link Bnary With Libraries and set Network to Optional.

[Solved] leetcode Common Error: :runtime error: member access within misaligned address 0xbebebebebebebebe for type ‘str

Common mistakes of brush force buckle:

runtime error: member access within misaligned address 0xbebebebebebebebe for type ‘struct TreeNode’, which requires 8 byte alignment [TreeNode.c]
0xbebebebebebebebe: note: pointer points here

 


cause:
when we access a variable, it contains an unassigned pointer. Pointers that are defined but not assigned are called wild pointers. The direction of the wild pointer is unknown, which has unknown consequences for the program, and the citation is a big problem. Therefore, C language strictly opposes the wild pointer.

In this topic, use

TreeNode* root = (TreeNode*)malloc(sizeof(TreeNode));

The root->left and root->right pointers are not assigned initial values or set to NULL, resulting in an error when assigning values to left and right later.

This can be solved by adding two statements.

TreeNode* root = (TreeNode*)malloc(sizeof(TreeNode));
root->left = NULL;	// Here's the problem!!! A null pointer without an assignment must be set to NULL
root->right = NULL;	// 

This is the correct code:

/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     struct TreeNode *left;
 *     struct TreeNode *right;
 * };
 */

typedef struct TreeNode TreeNode;


TreeNode* CreatTree(int* preorder,int* inorder,int l1,int r1,int l2,int r2){
    if(l1 > r1 || l2 > r2){      // Return NULL
        printf("%d",1);
        return NULL;
    }
    TreeNode* root = (TreeNode*)malloc(sizeof(TreeNode));
    root->left = NULL;	// Here's the problem!!! A null pointer without an assignment must be set to NULL
    root->right = NULL;	// 
    int i;
    root->val = preorder[l1];
    
    for(i=l2;inorder[i]!=root->val;i++);
    int lLen = i - l2;
    int rLen = r2 - i;
    if(lLen > 0){
        root->left = CreatTree(preorder,inorder,l1+1,l1+lLen,l2,l2+lLen-1);
    }
    
    if(rLen > 0){
        root->right = CreatTree(preorder,inorder,r1-rLen+1,r1,r2-rLen+1,r2);
    }
    return root;

}


struct TreeNode* buildTree(int* preorder, int preorderSize, int* inorder, int inorderSize){
    TreeNode* root = CreatTree(preorder,inorder,0,preorderSize-1,0,inorderSize-1);
    return root;
}

[Solved] An error occurred while processing your request…enable the Development environment by setting …

When a web project is deployed to the local machine, an exception occurs when accessing:

Error.
An error occurred while processing your request.
Request ID: |ee4a30bd-4030df869db691a6.

Development Mode
Swapping to Development environment will display more detailed information about the error that occurred.

The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.

 

Reason for the error:

The project itself uses the .netcore 3.1 framework, published to the IIS web.config, missing the ASPNETCORE_ENVIRONMENT configuration.

This error is displayed, meaning that the project itself reported an error, IIS thinks you can set the development version (Development) to see more detailed exception information, but you do not configure ASPNETCORE_ENVIRONMENT, so you can not think that this is the development version, you need to add, in order to show you the specific cause of the exception. So the configuration needs to be added.

Solution:
In the <aspNetCore> node of IIS web.config, add the ASPNETCORE_ENVIRONMENT configuration as follows.

<aspNetCore processPath="dotnet" arguments=".\IndustryWeb.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" >
  <environmentVariables>
    <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
  </environmentVariables>
</aspNetCore>

[Solved] PaddleX ERROR: Unexpected BUS error encountered in DataLoader worker

ERROR: Unexpected BUS error encountered in DataLoader worker. This might be caused by insufficient shared memory (shm),

reason

Set the number of num_workers is larger than the actual situation

Solution:

Change num_workers  to 0, or half the number of cores. It can also be configured not to let the system automatically obtain

The error message is as follows:

ERROR: Unexpected BUS error encountered in DataLoader worker. This might be caused by insufficient shared memory (shm), please check whether use_shared_memory is set and storage space in /dev/shm is enough
Traceback (most recent call last):
  File "train.py", line 72, in <module>
    use_vdl=True)  # 其用visuadl进行可视化训练记录
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/models/detector.py", line 334, in train
    use_vdl=use_vdl)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/models/base.py", line 333, in train_loop
    Exception in thread Thread-3:
Traceback (most recent call last):
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 583, in _get_data
    data = self._data_queue.get(timeout=self._timeout)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/multiprocessing/queues.py", line 105, in get
    raise Empty
_queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 505, in _thread_loop
    batch = self._get_data()
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 599, in _get_data
    "pids: {}".format(len(failed_workers), pids))
RuntimeError: DataLoader 1 workers exit unexpectedly, pids: 4652
for step, data in enumerate(self.train_data_loader()):

  File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 697, in __next__
    data = self._reader.read_next_var_list()
SystemError: (Fatal) Blocking queue is killed because the data reader raises an exception.
  [Hint: Expected killed_ != true, but received killed_:1 == true:1.] (at /paddle/paddle/fluid/operators/reader/blocking_queue.h:166)

How to Solve Microsoft.CppCommon.targets(279,5): error MSB3073

1>*** PARSE FAILURE ***
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(279,5): error MSB3073: The command "@echo off
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(279,5): error MSB3073: setlocal...

There is no problem with local compilation, and the compilation server reports an error.

The reason is the problem of GIT line feed in Windows system. The carriage return line feed in the project is modified in the vcxproj obtained by git, resulting in the script error in vcxproj.

Modify the GIT line feed setting of windows system, and the problem disappears.

[Solved] BLAST Database error: Error pre-fetching sequence data

1. Background:

Download the protein sequence in UniProt database to the local machine, use the file to create BLAST search database, and then use blastp command to search in the database.

2. Mistake

Follow the instructions in the blast manual. In order to speed up the search process, use the mask file. The sequence file sequences. Downloaded from UniProt FASTA, such as:

> sid1

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> sid2

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

………………………………………………………..

1) To create a mask file:

segmasker -in sequences.fasta -infmt fasta -outfmt maskingfo_asnl_bin \

-out refsequences.asnb -parse_seqids

2) Create database

makeblastdb -in sequences.fasta -input_type fasta -dbtype prot -out uniprot \

-title “Uniprot” -parse_seqids

3) Sequence alignment

blastp -db uniprot -query input.fasta -out output.txt -outfmt 7

Result error: BLAST Database error: Error pre-fetching sequences data

3. Solution

databases_seqids is not used when creating mask files and database.

segmasker -in sequences.fasta -infmt fasta -outfmt maskingfo_asnl_bin \

-out refsequences.asnb

makeblastdb -in sequences.fasta -input_type fasta -dbtype prot -out uniprot -title “Uniprot”

[Solved] python Connect hive to Install sasl Error: Building wheel for sasl (setup.py) … error

Collecting sasl
  Using cached sasl-0.3.1.tar.gz (44 kB)
Requirement already satisfied: six in c:\programdata\anaconda3\lib\site-packages (from sasl) (1.16.0)
Building wheels for collected packages: sasl
  Building wheel for sasl (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd59789a4b54e288cc48a38704a6ad4\\setu
p.py'"'"'; __file__='"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd59789a4b54e288cc48a38704a6ad4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) e
lse io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'D:\users\jingtao.CENTALINE\AppData\Local\Te
mp\pip-wheel-ea8xc0cu'
       cwd: D:\users\jingtao.CENTALINE\AppData\Local\Temp\pip-install-2scxm6jd\sasl_bdd59789a4b54e288cc48a38704a6ad4\
  Complete output (28 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\sasl
  copying sasl\__init__.py -> build\lib.win-amd64-3.9\sasl
  running egg_info
  writing sasl.egg-info\PKG-INFO
  writing dependency_links to sasl.egg-info\dependency_links.txt
  writing requirements to sasl.egg-info\requires.txt
  writing top-level names to sasl.egg-info\top_level.txt
  reading manifest file 'sasl.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE.txt'
  writing manifest file 'sasl.egg-info\SOURCES.txt'
  copying sasl\saslwrapper.cpp -> build\lib.win-amd64-3.9\sasl
  copying sasl\saslwrapper.h -> build\lib.win-amd64-3.9\sasl
  copying sasl\saslwrapper.pyx -> build\lib.win-amd64-3.9\sasl
  running build_ext
  building 'sasl.saslwrapper' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\sasl
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isasl -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include -IC:\Prog
ram Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\
include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Pr
ogram Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tpsasl/saslwrapper.cpp /Fobuild\temp.win-amd64-3.9\Release\sasl/saslwrapper.obj
  saslwrapper.cpp
  D:\users\jingtao.CENTALINE\AppData\Local\Temp\pip-install-2scxm6jd\sasl_bdd59789a4b54e288cc48a38704a6ad4\sasl\saslwrapper.h(22): fatal error C1083: 无法打开包括文件: “sasl/sasl.h”: No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for sasl
  Running setup.py clean for sasl
Failed to build sasl
Installing collected packages: sasl
    Running setup.py install for sasl ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd59789a4b54e288cc48a38704a6ad4\\se
tup.py'"'"'; __file__='"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd59789a4b54e288cc48a38704a6ad4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__)
 else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'D:\users\jingtao.CENTALINE\AppData\Loca
l\Temp\pip-record-l_ubu2on\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\sasl'
         cwd: D:\users\jingtao.CENTALINE\AppData\Local\Temp\pip-install-2scxm6jd\sasl_bdd59789a4b54e288cc48a38704a6ad4\
    Complete output (28 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\sasl
    copying sasl\__init__.py -> build\lib.win-amd64-3.9\sasl
    running egg_info
    writing sasl.egg-info\PKG-INFO
    writing dependency_links to sasl.egg-info\dependency_links.txt
    writing requirements to sasl.egg-info\requires.txt
    writing top-level names to sasl.egg-info\top_level.txt
    reading manifest file 'sasl.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    adding license file 'LICENSE.txt'
    writing manifest file 'sasl.egg-info\SOURCES.txt'
    copying sasl\saslwrapper.cpp -> build\lib.win-amd64-3.9\sasl
    copying sasl\saslwrapper.h -> build\lib.win-amd64-3.9\sasl
    copying sasl\saslwrapper.pyx -> build\lib.win-amd64-3.9\sasl
    running build_ext
    building 'sasl.saslwrapper' extension
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\sasl
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isasl -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include -IC:\Pr
ogram Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\1
0\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\
Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tpsasl/saslwrapper.cpp /Fobuild\temp.win-amd64-3.9\Release\sasl/saslwrapper.obj
    saslwrapper.cpp
    D:\users\jingtao.CENTALINE\AppData\Local\Temp\pip-install-2scxm6jd\sasl_bdd59789a4b54e288cc48a38704a6ad4\sasl\saslwrapper.h(22): fatal error C1083: 无法打开包括文件: “sasl/sasl.h”: No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd
59789a4b54e288cc48a38704a6ad4\\setup.py'"'"'; __file__='"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd59789a4b54e288cc48a38704a6ad4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__fi
le__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'D:\use
rs\jingtao.CENTALINE\AppData\Local\Temp\pip-record-l_ubu2on\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\sasl' Check the logs for full command output.

 

Solution:
Download a sasl file that corresponds to the Python version and Windows version you are using: https://www.lfd.uci.edu/~gohlke/pythonlibs/#sasl. For example, sasl-0.2.1-cp36 -cp36m-win_amd64.whl, which corresponds to Python version 3.6, and corresponds to Windows system 64-bit.
Install the executable pip install sasl-0.2.1-cp37-cp37m-win_amd64.whl

[Solved] NCCL error in: /pytorch/torch/lib/c10d/ProcessGroupNCCL ,unhandled cuda error, NCCLversion 2.7.8

The method used in this paper

The versions of pytorch, cudatoolkit and CUDA driver should be consistent

Problem description

When training the stylegan3 model with multi GPU:

python train.py --outdir=training-runs --cfg=stylegan3-r \
--data=datastes/your_data.zip \
--cfg=stylegan3-r --gpus=4 --batch=32 --gamma=8 --kimg=1800 --snap=50  --tick=2  

Error Messages:

torch.multiprocessing.spawn.ProcessRaisedException:
……
RuntimeError: NCCL error in: /opt/conda/conda-bld/pytorch_1631630841592/work/torch/lib/c10d/ProcessGroupNCCL.cpp:911, unhandled cuda error, NCCL version 2.7.8
ncclUnhandledCudaError: Call to CUDA function failed.

Local Environment
4xTeslaV100 graphics card drivers and CUDA version 11.0

stylegan3 Default Environment

Solution:
Go to the pytorch official website and search the corresponding version of  Cudatookit

conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch

Tried Method:

Method 1: install nccl (this article is useless)

Method 2: the versions of pytorch, CUDA toolkit and CUDA driver are the same

https://github.com/ultralytics/yolov5/issues/4530

jenkenis ERROR: Error fetching remote repo ‘origin‘ [How to Solve]

explain:

During the work, Jenkins made such a mistake in pulling gitlab as below:

jenkenis ERROR: Error fetching remote repo ‘origin‘

 

The pipeline command is as follows:

pipeline {
    agent any

  options {
      timeout(time: 2, unit: 'HOURS') 
  }
  
    stages {
        stage('Fetch code') {
            steps {
                echo 'Hello World'
                checkout([$class: 'GitSCM', branches: [[name: '*/master']],
                doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', depth: 1, noTags: true, reference: '', shallow: true, timeout: 120]], 
				submoduleCfg: [],userRemoteConfigs: [[credentialsId: '49352c9d-3f03-4271-8b60-2fddab3ca058', url:
                '[email protected]']]])
                
            }
        }
    }
}

Solution:

cd to the specified directory under the corresponding workspace, such as workspace\test_pipelinescript here, and manually clone the project to the local through git clone. It should be noted here:

1. Delete the .git folder in the test_pipelinescript directory;

2. Copy everything in the test_jenkins directory to test_pipelinescript

3. Restart Jenkins service.

Enter services.msc through Win + R, find Jenkins service and stop –> Start

4. Re-trigger Jenkins to execute again, and it’s OK.