Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dwforest
Specialist II
Specialist II

Trapping "System error:***"

I believe what is happening is that more than one Application is loading/writing to the same Folder Connection. It is not the same file; so maybe Qlik Sense treats a Folder Connection as single use?

I put  code into my load script to attempt to wait for the "lock" to be released; below is an excerpt of the log. You can see that the error occurs and the script continues with ErrorMode=0, however ScriptError is null so it's as if there isn't an error.

Any other variable to check? Any other way to handle this error? Do we really need unique connections to a folder? We are storing several qvd in a folder for a foundation of several applications to minimize retrieval from the databases.

2018-12-13 13:07:52 0055 SET ErrorMode=0
2018-12-13 13:07:52 0056 SET LoopCnt=1
2018-12-13 13:07:52 0058 DO
2018-12-13 13:07:52 0060 STORE [Provider] INTO LIB://qvd/PROVIDER.qvd (qvd)
2018-12-13 13:08:02 Error: Cannot open file: 'LIB://qvd/PROVIDER.qvd' (Native Path: ***
2018-12-13 13:08:02 System error: ***)
2018-12-13 13:08:02 0065 If LoopCnt=5 then
2018-12-13 13:08:02 0069 LET msg = 'Error: ' & ScriptError & ' - Loop: ' & LoopCnt
2018-12-13 13:08:02 0070 Trace Error: - Loop: 1
2018-12-13 13:08:02 0070 Error: - Loop: 1
2018-12-13 13:08:02 0071 
2018-12-13 13:08:02 0073 Sleep 10000
2018-12-13 13:08:12 0074 LET LoopCnt = LoopCnt +1
2018-12-13 13:08:12 0076 LOOP UNTIL ScriptError=0
2018-12-13 13:08:12 0079 SET ErrorMode=1

Please and Thank you!

Labels (1)
1 Reply
dwforest
Specialist II
Specialist II
Author

Update, changing the test to ScriptErrorCount<>0 works for catching the error, but still running into an issue writing the QVD.
Is there a way to test for file lock rather than just adding an arbitrary wait?