In case of an error, the following diagram is given:
# download nest_asyncio
pip3 install nest_asyncio
Add the following two lines at the beginning of the asynchronous collaboration code, or in the code:
After consulting the data, it is found that using the Jupiter notebook environment, it is connected to the IPython kernel, and the IPython kernel itself runs on the event loop,
while asyncio does not allow nesting of its event loop, so the error message as shown in the above figure will appear.
nest_asyncio exists as a patch for asynchronous operations.
Redistemplate uses increment to report an error: io.lettuce.core.RedisCommandExecutionException: ERR value is not an intege
We can learn from spring’s documents that spring has two rare serialization strategies for redis. One is the JDKSerializationRedisSerialzer serialization of RedisTemplate application. The serialized value contains object information, version number, class information, etc. after this serialization, a string cannot be self incremented.
The other is the StringRedisSerializer adopted by the StringRedisTemplate. This strategy converts the string value into a byte array, so the values saved in redis can be operated.
Replace RedisTemplate with String RedisTemplate
/home/optimizer-master/third_party/onnx_common/tensor.h:117: size_from_dim: Assertion dim >= 0 && (size_t)dim < sizes_.size() failed.
When import onnx, I encountered the above problems
If there is an op operation that cannot be exported during onnx export, this error will be reported
How to Solve:
find the operation that cannot be exported and add a judgment. If you export onnx, the op will not be used. An example is as follows
def forward(self, x):
if torch.onnx.is_in_onnx_export():# if onnx
return x * self.act(x)/6
else: # normally
return x * self.act(x + 3)/6
Create a maven project in idea and import pom.xml, related configuration. The following error occurred while running
****.***.***error in opening zip file
This error report occurs due to a jar version conflict in maven.
Delete the maven local repository jar package, and then idea in the project refresh, let maven re-download dependencies. (the error reported in those lines, there is a corresponding path, you can delete it)
According to the error path, delete the corresponding jar from your computer. When you come back and refresh, it’s finished.
Error: IMKClient Stall detected, please Report your user scenario attaching a spindump (or sysdiagnose) that captures the problem – (imkxpc_presentFunctionRowItemTextInputViewWithEndpoint:reply:) block performed very slowly (19.35 secs).
Restart the service.
Cause of problem:
1. The function name is the same as the file name
2. Missing \vlfeat-0.9.21\toolbox\mex\mexw64.
Error: function Directory:
[ kp1,ds1 ] = vl_sift(single(rgb2gray(img1)),'PeakThresh', 0,'edgethresh',3);
1. Rename vl_sift.m to vl_sift1.m to solve it perfectly.
2. Copy the mex folder from other projects to \vlfeat-0.9.21\toolbox directory
vlfeat-0.9.21 version may have this problem. vlfeat-0.9.14 version mex is basically compiled. So there is no such problem.
Mongodb used to work well before. Today, it suddenly started to report an error. According to the Internet, the possible reasons are:
1. failed to start when service mongodb restart
2. caused by not shutting down mongodb properly, such as direct kill -9 <pid> causes
3. locked by multiple threads when inserting data [may be too much data, space capacity is insufficient].
Delete the mongod.lock file under dbpath, then delete all log files under logpath, and finally execute reboot to restart the server side.