Category Archives: Error

[Solved] ERROR #42601 syntax error at or near “)“

 

Background

orm:go-pg

Execute whereIn error: Error #42601} syntax} error at} or “near”)

As shown in the figure

The query is as follows:

err = db.Model(&model.Abc{}).WhereIn(“id in (?)”, ids).Column(“id”).Column(“name”).Select(&records)

If IDS is an empty slice, this error will be reported at this time

Solution:

The slices passed in should not be empty. From the business point of view, the length of the list of condition ids to be checked is 0 then the results must not be checked, so you can make a judgment in the outer layer, ids length is 0 then do not take the sql query can be.

[Solved] TwinCAT3 Error: Ads error: 4115 (0x1013, RTIME: system clock setup fails.

Error 15 27/01/2015 23:23:48 551 ms | 'TwinCAT System' (10000): Sending ams command >> Init4\RTime: Start Interrupt: Ticker started >> Ads error: 4115 (0x1013, RTIME: system clock setup fails.

Hint: On Windows8 system execute win8settick.bat in TwinCAT\3.1\System as administrator and reboot.) << failed!

 

Solution: Go to TwinCaT folder in C drive, TwinCaT>3.1>system, run win8settick.bat as administrator, and restart the computer.

Note: if the same error is reported after restart, run it several times and restart. That’s how I restarted it twice.

[Solved] paddle:FatalError: `Segmentation fault` is detected by the operating system.

Question

When using the paddle framework for relevant model training, an error is reported when using the GPU:

C++ Traceback (most recent call last):
--------------------------------------
0 std::thread::_Impl<std::_Bind_simple<ThreadPool::ThreadPool(unsigned long)::{lambda()#1} ()> >::_M_run()
1 std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)
2 paddle::framework::SignalHandle(char const*, int)
3 paddle::platform::GetCurrentTraceBackString[abi:cxx11]()

----------------------
Error Message Summary:
----------------------
FatalError: `Segmentation fault` is detected by the operating system.
[TimeInfo: *** Aborted at 1639543591 (unix time) try "date -d @1639543591" if you are using GNU date ***]
[SignalInfo: *** SIGSEGV (@0x0) received by PID 168238 (TID 0x7fc05d8c5700) from PID 0 ***]

edition:

python=3.8 paddlepaddle-gpu=2.2.1 cuda=10.1 cudnn=7.6

Check the issue and find that many of these situations occur. Make a record here

Solution:

Reinstall using CONDA.

Execute command:

conda install paddlepaddle-gpu==2.2.1 cudatoolkit=10.1 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/

[Solved] mongodb Startup Error: ERROR: child process failed, exited with error number 14

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].

My solution:

Delete the mongod.lock file under dbpath, then delete all log files under logpath, and finally execute reboot to restart the server side.

[Solved] ElasticSearch Startup Error: error updating geoip database

Problem Description:

Error when launching elasticsearch:
error updating geoip database

[2021-12-22T21:07:11,944][INFO ][o.e.i.g.GeoIpDownloader  ] [DESKTOP-5JGQJR8] updating geoip database [GeoLite2-ASN.mmdb]
[2021-12-22T21:07:13,022][ERROR][o.e.i.g.GeoIpDownloader  ] [DESKTOP-5JGQJR8] error updating geoip database [GeoLite2-ASN.mmdb]
org.elasticsearch.cluster.block.ClusterBlockException: index [.geoip_databases] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];

Cause analysis:

This is a bug


Solution:

Add the following configuration to elasticsearch.yml:

ingest.geoip.downloader.enabled: false

Turn off geoip database updates

[Solved] mongodb Backup Error: Failed: error getting collections for database `admin`: error running `listCollections`

Backup Command:

# mongodump -h 127.0.0.1:27229 -u root -p pw123456 –authenticationDatabase admin  -o /data/backup/mongoDB

Error Messages:

Failed: error getting collections for database `admin`: error running `listCollections`. Database: `admin` Err: not authorized on admin to execute command { lcursor: {}, $readPreference: { mode: “secondaryPreferred” }, $db: “admin” }

Solution:

> use admin

> db.auth("root","pw123456")

> db.grantRolesToUser ( "root", [ { role: "__system", db: "admin" } ] )  #Grant the admin user permission to execute commands on the system.version table

[Solved] Error: error getting chaincode bytes: ‘go list‘ failed with: cannot find module providing package


Execute the packing command.
peer lifecycle chaincode package sacc.tar.gz
–path github.com/hyperledger/fabric-cluster/chaincode/go/
–label sacc_1

Error Messages:

Error: error getting chaincode bytes: ‘go list’ failed with: cannot find module providing package github.com/hyperledger/fabric-cluster/chaincode/go: working directory is not part of a module: exit status 1

Solution:

The command go env -w GO111MODULE=auto solves this problem

[Solved] jetson Compile pytorch Error: internal compiler error: Segmentation fault

The following error occurred when compiling pytorch by Jetson:

/usr/include/c++/7/cmath: In static member function ‘static scalar_t at::native::div_floor_kernel_cuda(at::TensorIterator&)::<lambda()>::<lambda()>::<lambda(scalar_t, scalar_t)>::_FUN(scalar_t, scalar_t)’:
/usr/include/c++/7/cmath:1302:38: internal compiler error: Segmentation fault
   { return __builtin_copysignf(__x, __y); }

This is because compiling STD::copysign() is too expensive for the Jetson platform.

There are two solutions:
1. upgrade pytorch to version 1.9. Pytorch 1.9 uses the C10::CUDA::compat::copysign()function instead of the STD::copysign()function.
2. Submit and modify the code according to this:
Workaround arm64 gcc error in std::copysign on Jetson platforms

[Solved] Quartus II waveform simulat error: error: waveform2 vwf. VT (30): near “,” syntax error, unexpected “, ‘# * * error

I. problem
when quartus is used to design 4 frequency divider based on D trigger, the following errors occur in waveform simulation:

 Error: Waveform2.vwf.vt(30): near ",": syntax error, unexpected ','
# ** Error: D:/Quartus/modelsim_ase/win32aloem/vlog failed.
# Executing ONERROR command at macro ./D4.do line 4
Error. 

II. Solution

in the schematic design, my input and output ports are named input and output respectively. That’s the mistake. We just have to name it something else. For example: CLKIN, out. Then recompile and no error will be reported during simulation. The correct simulation diagram is as follows: