Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jpar0511
Contributor III
Contributor III

General Script Error when loading from csv-File

Hello together,

we have moved our system installation from QV 11.20 to a new machine and a fresh installation of QV 12.10 SR2.

Unfortunately one of our tasks is showing some crazy behaviour.

This didn't happen on the old machine!

We have two QVW-Tasks. The first one is getting some data from different sources and storing this data split up by country in separate CSV-Files.

The other Task is triggered by successful finishing the first task.

The job is to put the country information together in a big table exporting the complete chart after some more additions as a qvd.

Unfortunatelly this ends up with a general script error after some successfull loads (meaning 3 files are loaded and the 4th ends with an error).

The partial log looks like this:

2017-04-06 15:20:52 0077

  2017-04-06 15:20:52 0057 let fDate_1 = left('E:\Qlikview\QVD\SAP\FI\Abgleich_CH_2017-03-31_V19.4_VLF_Task_01.csv',42)

  2017-04-06 15:20:52 0058 let fDate =purgechar(right('E:\Qlikview\QVD\SAP\FI\Abgleich_CH_2017-03',7),'-')

  2017-04-06 15:20:52 0060 SAP_BALANCES:

  2017-04-06 15:20:52 0061 LOAD SAP,

  2017-04-06 15:20:52 0062      ACC,

  2017-04-06 15:20:52 0063      SOURCE,

  2017-04-06 15:20:52 0064      BETRAG,

  2017-04-06 15:20:52 0065      Land,

  2017-04-06 15:20:52 0066      '201703' as SAP_Date,

  2017-04-06 15:20:52 0067      @0

  2017-04-06 15:20:52 0068

  2017-04-06 15:20:52 0069 FROM E:\Qlikview\QVD\SAP\FI\Abgleich_CH_2017-03-31_V19.4_VLF_Task_01.csv

  2017-04-06 15:20:52 0070 (txt, utf8, embedded labels, delimiter is ';', msq)

  2017-04-06 15:20:52      7 fields found: SAP, ACC, SOURCE, BETRAG, Land, SAP_Date, @0,

  2017-04-06 15:20:52      1.758 lines fetched

  2017-04-06 15:20:52 0072 execute cmd.exe /c move E:\Qlikview\QVD\SAP\FI\Abgleich_CH_2017-03-31_V19.4_VLF_Task_01.csv E:\Qlikview\QVD\SAP\FI\Archive

  2017-04-06 15:20:52      Running an execute command

2017-04-06 15:20:52 0076 Next

2017-04-06 15:20:52 0077

  2017-04-06 15:20:52 0057 let fDate_1 = left('E:\Qlikview\QVD\SAP\FI\Abgleich_DE_2017-03-31_V19.4_VLF_Task_01.csv',42)

  2017-04-06 15:20:52 0058 let fDate =purgechar(right('E:\Qlikview\QVD\SAP\FI\Abgleich_DE_2017-03',7),'-')

  2017-04-06 15:20:52 0060 SAP_BALANCES:

  2017-04-06 15:20:52 0061 LOAD SAP,

  2017-04-06 15:20:52 0062      ACC,

  2017-04-06 15:20:52 0063      SOURCE,

  2017-04-06 15:20:52 0064      BETRAG,

  2017-04-06 15:20:52 0065      Land,

  2017-04-06 15:20:52 0066      '201703' as SAP_Date,

  2017-04-06 15:20:52 0067      @0

  2017-04-06 15:20:52 0068

  2017-04-06 15:20:52 0069 FROM E:\Qlikview\QVD\SAP\FI\Abgleich_DE_2017-03-31_V19.4_VLF_Task_01.csv

  2017-04-06 15:20:52 0070 (txt, utf8, embedded labels, delimiter is ';', msq)

  2017-04-06 15:20:52      7 fields found: SAP, ACC, SOURCE, BETRAG, Land, SAP_Date, @0,

  2017-04-06 15:20:52      General Script Error

  2017-04-06 15:20:52      Execution Failed

  2017-04-06 15:20:52      Execution finished.

As you can see, one file is working, the next not. Pretty funny about this is, that when the same QVW is started from the desktop client it works without errors. If the task is started manually for a second time it also processes all files that are left. But using the Task there is no chance to process all files

Here is the script part that runs fine for 3 times and then causes the general error:

script.png

I tried really anythin I could imagine - sleep times between the runs or at the beginning to avoid file being locked by the old reload - nothing worked out.

Please help me

Best regards & many thanks
Jörg

10 Replies
jpar0511
Contributor III
Contributor III
Author

Hi all,

I did a bit of trial and error as suggested. Our Desktop and Server are both on the same service release to avoid mixing

Here are the testing results:

- tracing any variable   
           no result that would help
- sleep statements        
           no result that would help (that was my first try to avoid file locks)
- removing msq from the file-format         
           no result that would help
- checking the csv-fileformat - are both really utf8         
           no result that would help (all files are created in a loop by the same QVW)
- checking the active directory for the access-rights for both files         
           no result that would help
- skipping the load-order of the files within the filelist-loop (renaming DE to AA should work)         
           no result that would help --> File AA is skipped than or if put to the end ZZ is skipped
- loading the fields with a * wildcard        
           no result that would help
- using first 10 or similar to check if a reduced load will run   
I tried First 10 and the whole script ran perfect. I adjusted it first to 100, then to 1.000 and finally to 10.000. Everything is  loading as suggested - although done through the Task. As we have approx. 6.800 lines of data in this csv file this would have been the final solution. In order to avoid future problems I tried with 100.000 lines and finally set the FIRST paramenter to 500.000. It's still running as planned.
My personal result is that when using a limit (doesn't matter of which size) the load operations works for my CSV-Files.
- storing each file as qvd and then droping the table and after the loop loading the qvd again    
           didn't try that

Thank you very much for that trial and error-suggestions marcus_sommer and all others for the tipps.

Finally - strange behaviour of QlikView - don't know if that might be a support topic.

A nice weekend to all of you!