Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

1 Solution

Accepted Solutions
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!

View solution in original post

10 Replies
sfatoux72
Partner - Specialist
Partner - Specialist

Hi,

Read this, the problem is perhaps linked to the EXCUTE action :

QV 12.10 “Can Execute External Programs” is back | Qlikview Cookbook

jpar0511
Contributor III
Contributor III
Author

‌Hi,

thanks for the feedback. I already read it - unfortunately this doesn't work out as I still have it activated

jpar0511
Contributor III
Contributor III
Author

Hey there,

as a result to the execute-hint again I tried to comment the part with the execute command.

For the fail it is independent whether the execute command is in use or not.

tamilarasu
Champion
Champion

Hi Jorg,

I am not sure but it looks like the file has some problem while fetching the data. Could you try to load the specific file alone and see whether the rows are fetched properly or not.

Capture.PNG

jpar0511
Contributor III
Contributor III
Author

That was my first guess. But in a second run it works without any problems (same file, nothing else changed).

Here is the log for a single load of the "problem-causing-file":

script2.png

Created with the German version but that should make no difference for the result.

tamilarasu
Champion
Champion

Try this,

LOAD SAP,

ACC,

SOURCE,

BETRAG,

Land,

'201703' as SAP_Date,

@0

FROM

(txt, utf8, embedded labels, delimiter is ';', msq);

jpar0511
Contributor III
Contributor III
Author

Hi Tamil,

thank you but no difference at all

tamilarasu
Champion
Champion

Jorg,

No idea . I am not sure why it's not working when you scheduled the job but the same working in your desktop client perfectly. marcus_sommer might have answer for this behavior. Lets wait for his reply.

marcus_sommer

It sounds really buggy. Is the client in which it worked on the same release as the server? If not there could be a problem because different release shouldn't be mixed up - maybe an upgrade to 12.10 SR4 is a solution.

Beside this I would do some trial & error, for example:

- tracing any variable

- sleep statements

- removing msq from the file-format

- checking the csv-fileformat - are both really utf8

- checking the active directory for the access-rights for both files

- skipping the load-order of the files within the filelist-loop (renaming DE to AA should work)

- loading the fields with a * wildcard

- using first 10 or similar to check if a reduced load will run

- storing each file as qvd and then droping the table and after the loop loading the qvd again

I hope it will be useful in any way.

- Marcus