Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script error


Can anyone point me in the right direction of correcting this script - Everything seems to be ok but its failing to load - prob something simple

I'm cert its something to do with the file path actually - recall being told if the files on your desktop that ya uploading it causes the script to full over

Any help be gd

Tx

Paul

[Aircraft Types]:
LOAD AC_TYPEID as [%Aircraft Type ID],

    
AC_GROUP as [%Aircraft Group Type],

    
SSD_NAME as [Aircraft Name],

    
MANUFACTURER as [Aircraft Manufacturer],

    
LONG_NAME as [Aircraft Name Full],

    
SHORT_NAME as [Aircraft Name Abbreviated],

    
BEGIN_DATE as [Aircraft Begin Date],

    
END_DATE as [Aircraft End Date]
FROM

[..\..\..\..\..\paul\Desktop\Qlikview download\Chapters 1 - 11\QlikView
Development\Airline Operations\Data Files\CSVs\Aircraft_Base_File.csv]

(
txt, codepage is 1252, embedded labels, delimiter is ';', msq);







[Aircraft Groups]:
LOAD [Aircraft Group ID] as [%Aircraft Group Type],

    
[Aircraft Engine Type],

    
[Aircraft Number Of
Engines]

FROM

[..\..\..\..\..\paul\Desktop\Qlikview download\Chapters 1 - 11\QlikView
Development\Airline Operations\Data Files\CSVs\Aircraft_Group.csv]

(
txt, codepage is 1252, embedded labels, delimiter is ';', msq);




32 Replies
Anonymous
Not applicable
Author

Any specific error message?

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Paul,

I would look at simplifying the relative path.  Save your QVW into the folder

Desktop\Qlikview download\Chapters 1 - 11\QlikView

Development\ and the relative path is then just .\Airline Operations\Data Files\CSVs\Aircraft_Base_File.csv .

The only other thing that looks iffy in the script is the carriage return in the middle of the Number of Engines field.  Should that be there?

Most things in QlikView load scripts give reasonably sensible error messages.  The couple of things that don't are having the same field name appearing twice in a single load, trying to write a file (eg. QVD) to a folder that does not exist or trying to overwrite a locked file.  These things all cause failures with no sensible error message.

I can see you are loading in example data from QlikView 11 For Developers.  I've run training courses based on this book a number of time, and can assure you that these loads tend to work fine (when delegates don't forget semi colons).

Personally, I would not put spaces in table labels, which means the square brackets are not required there - but I know the exercises in the book suggests you do have them.

Hope that helps,

Steve

Not applicable
Author

No error message just jumps straight to the little failed dialog box - I think this is deff a path issue actually and will give Steve's solution a bash - See if that helps

Tx

Paul

Not applicable
Author

Hi Steve

Might try moving my file to the same location see if that helps as per your advice!

The path is rather long

Did try moving my working files to my documents - but still same error

Your correct loading data from developer - fab up to now

I'm following the developer guide to the T so everything you see is as per instructions

Let me have bash and I will let you know how I get on

Tx for your help!

Paul 

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Copied your code from this post into the script editor. Changed long paths into [.\Data Files\CSVs\Filename.csv]. Ran the script and got this error:

FieldnameWithNewline.jpg

I removed the Newline and the script now runs without any problems. No idea why you're not getting an error message.

I'm using Desktop 11.20SR8.

Peter

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi Paul,

any  one table  comment and  reload aplication .can come to know reload failed happen from  which table.

any store statement using in application?

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

There is a point in the book where QlikView bails out without an error message. Right after it advises you to save before reload.

The text asks you to re-jig your script a bit, leaving a couple of list boxes that don't have fields attached.  In earlier versions of QlikView this worked fine - it just showed you the empty list boxes.  On more recent versions it fails.  If you delete the list boxes before the reload all is fine. Also, if you do a Debug load with very few rows it also works.  It's the Aircraft Group and Aircraft Type list boxes on page 220.

Looking at the code you have I suspect this is where you are in the book.

Also, while we are on little gotchas in the book, there is a variable name that has a case issue. There is a variable that is quoted as eAirTime  and eAirtime.  On page 191 it should show with a capital T.

Hope that helps,

Steve

Not applicable
Author

Well I'm at a total loss on this error I've totally started again thinking it was something I had done along the way just got to loading that script and exactly the same thing as occurred. This time I created a folder right next to my C-drive content    .

The weird thing is if I open a new Qlik doc totally blank and load the script it loads perfectly fine. Its seriously strange and very frustrating

LOAD AC_TYPEID as [%Aircraft Type ID],

    
AC_GROUP as [%Aircraft Group Type],

    
SSD_NAME as [Aircraft Name],

    
MANUFACTURER as [Aircraft Manufacturer],

    
LONG_NAME as [Aircraft Name Full],

    
SHORT_NAME as [Aircraft Name Abbreviated],

    
BEGIN_DATE as [Aircraft Begin Date],

    
END_DATE as [Aircraft End Date]

FROM
[..\Aircraft_Base_File.csv]

(
txt, codepage is 1252, embedded labels, delimiter is ';', msq);





[Aircraft Groups]:

LOAD [Aircraft Group ID] as [%Aircraft Group Type],

    
[Aircraft Engine Type],

    
[Aircraft Number Of Engines]

FROM

[..\Aircraft_Group.csv]

(
txt, codepage is 1252, embedded labels, delimiter is ';', msq);

SunilChauhan
Champion
Champion

keep .csv file and qvw application in same folder and use dircetory keyword below

directory;

LOAD AC_TYPEID as [%Aircraft Type ID],

    
AC_GROUP as [%Aircraft Group Type],

    
SSD_NAME as [Aircraft Name],

    
MANUFACTURER as [Aircraft Manufacturer],

    
LONG_NAME as [Aircraft Name Full],

    
SHORT_NAME as [Aircraft Name Abbreviated],

    
BEGIN_DATE as [Aircraft Begin Date],

    
END_DATE as [Aircraft End Date]

FROM
[Aircraft_Base_File.csv]

(
txt, codepage is 1252, embedded labels, delimiter is ';', msq);





[Aircraft Groups]:
directory;
LOAD [Aircraft Group ID] as [%Aircraft Group Type],

    
[Aircraft Engine Type],

    
[Aircraft Number Of Engines]

FROM

[Aircraft_Group.csv]

(
txt, codepage is 1252, embedded labels, delimiter is ';', msq);

hope this helps

Sunil Chauhan