Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

'Execution of Script Failed. Reload old data?' error message

Hi There

I am getting the following error message in QlikView when I do an incremental reload to an exsiting QVD:

QVError.png

I find this error to be the most ambigious error ever! Just thought I should clear that up as this error frustrates me as it is not clear what it means.

I have a QVD which has all historic data stored in the same directory as my QVW. I am loading csv and Excel files which match the data structure of the QVD. The fields are exactly the same and the formats for each field are exaclty the same as the QVD.

The following is my code for setting up the historic QVD location and getting the maximum date when the data was last loaded.

let vQVDPath='.\User_Data_Historic.qvd';    //?? The QVD filename

LET vExecution = now();

set vLastExecTime = 0;

if not isnull(QVDCreateTime('$(vQVDPath)')) then

LoadTime:

load max(date(User_CalendarDate)) as User_CalendarDate

from $(vQVDPath)(qvd);

let vLastExecTime = peek('User_CalendarDate', 0, 'LoadTime');

drop table LoadTime ;

end if


Data:

noconcatenate load

U_ID,

[User_CalendarDate],

User_ID,

[User_Registration_Date],

ONLINE_ID,

[Login],

[POSTS],

[PAGE],

[LOGINS],

[MINUTES],

User_ACCEPTED,

User_GIVEN,

User_RECEIVED,

[User_NOTES],

Flag

resident MyTable where  [User_CalendarDate] >= '$(vLastExecTime)' and [User_CalendarDate] < '$(vExecution)';

drop table MyTable;

The next step is to append the data, evaluating the load time for the QVD on the last load.

if not isnull(QvdCreateTime('$(vQVDPath)')) then

concatenate (Data) load

* from $(vQVDPath) (qvd) where not exists(U_ID);

end if

if NoOfRows('Data') > 0 then

store Data into $(vQVDPath) (qvd);

Above is the load of new data. I have concatenated two Excel files together to form one table which should be appended to the historic QVD. Data should be loaded where the Calendar Date in the new data is higher than the maximum date in the historic QVD.

After reloading my script I get the 'Execution of Script Load' error and I have used this exact code for another dataset and I have encountered no error and runs fine. After reading many posts on the QlikCommunity, I have exhausted the many possible reasons into why I get the error.

Does someone know why this is happening only on this load and not on other loads?

Thanks

33 Replies
erichshiino
Partner - Master
Partner - Master

HI,

Did you try to enable log files? Maybe the you can get more details on the point where your script if failling.

To enable it, go to settings - > Document properties -> General Tab -> check 'Enable log file'

After a reload (or when you try it) a file with the same name of your qvw but with the extension .log will be generated in the same folder of your qvw.

If you post your results here it might be easier to help you.

From your script, I'd say it is problably during your store command. The file might be blocked or the path was not accepted.

Hope this helps,

Erich

Not applicable
Author

Hi Erich

I have used your solution to enable log files.

Miraculously the script works fine now and all my newly loaded data is being appended to my historic QVD. The path I use for storing and accessing the QVD is accessible and like I said in my previous post it is used in other QlikView documents successfully with no problems.

This error is unexplained and is a hidden 'Easter Egg' that the guys at Qliktech have planted!

Thanks for your reply Erich.

robertomontanar
Partner - Contributor III
Partner - Contributor III

Sometimes the file your qvw document try to write, is locked by someone else, that is writing too.

It happen very often to me, because I use more than one qv.exe istance in the same time.

In this case, the error reported by QlikView is exactly what you get

Could be the same as your experience ?

Not applicable
Author

Hi Roberto

Thank you for your answer.

To confirm, there are no other instances of QV.Exe or QVConnect in the task scheduler. This was the first thing I had checked. I agree that having more than one process for QV creates this error and I have experienced this before.

I usually try all possible avenues before I come on the community for a solution. To be honest, this error is ambigious as there is not a documented reason for this to occur.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

This error is commonly seen during development. What happens is you are developing a script and on reload you have some type of understandable error -- like a syntax error. You fix the error and reload but then start to receive the dreaded "General script error". This is usually due to the files (usually a QVD) being left locked by the first script failure. You can clear this problem up by exiting QV and starting again.

-Rob

Miguel_Angel_Baeyens

Hi,

That's certainly an ambiguous error message that means no more and no less than "something went wrong". The first step I always take when the issue is not obvious is to peform a limited debug load, with 100 records or even less, step by step to see where the script ends, and what values are the variables storing, how many records are being pulled from the sources, whether or not the connections are taking place, the files are stored properly...

Did you try that to see where the script crashes or what happens just after the load? You are using time functions like QvdCreateTime() to check when the file was created. Is there any chance that the difference between the successful and failed loads is in the OS time or local time settings?

Use the script variable "ScriptError" to check if you can get a reason according to those documented in the Reference Manual.

Hope that makes some sense.

Miguel

Not applicable
Author

sometimes, deleting the previously created qvd before doing a reload also helps since qv has locked the qvd and does not overwrite it automatically.

Not applicable
Author

Thanks Jasleen, this tip helped me out

Not applicable
Author

Am glad it help. Its one of those quirky things.