Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
nahuel04
Contributor II
Contributor II

Console error

Hello, 

thanks in advance ,

I have the next problem with script and reload a qvw from a console.

my script in a .qvw:

Sub GetFiles(vPath)
For each vFile in FileList('$(vPath)\*.*')
ARCHIVOS_Gaviport:
Load
UPPER(RIGHT('$(vFile)', LEN( TRIM('$(vFile)')) - INDEX('$(vFile)', '.', -1))) AS EXTENSION_G ,
RIGHT('$(vFile)', LEN( TRIM('$(vFile)')) - INDEX('$(vFile)', '\', -1)) AS ARCHIVO_CORTO_G ,
'$(vPath)' AS CARPETA_G ,
'$(vFile)' AS ARCHIVO_LARGO_G ,
NUM(FileSize('$(vFile)') / 1024, '#.##0 kB') AS TAMAÑO_G ,
FileTime('$(vFile)') AS FECHA_G
AutoGenerate(1)
;
Next

End Sub

Call GetFiles('\\192.168.10.152\Fotos\Compras\');

when I running it from qlikview desktop works properly , but when  I try to running this from  qlikview management console I have next console error(attach a word).

In addition I checked folder security and it is ok.

thanks 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It looks to me like zero files are being found in the FileList() function when run on the server.  Best guess is that the account running the Distribution Service does not have permission to list files in that directory.

-Rob

 

View solution in original post

6 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You will want to look at the document script log to find out what the specific reload error was. 

-Rob

nahuel04
Contributor II
Contributor II
Author

Thanks Rob ,

But where can I find it ?

I found this folder  C:\ProgramData\QlikTech\DistributionService\1\Log\20190527 and I checked the log and it is the same that attached. I don't know whats appened .

Thanks,

Attached a log.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

if Document Log is enabled, in that same folder you should have a file named "DocumentLog.txt".  Also in the same folder as the QVW will be a file named same as qvw with ".log" suffix. E.g. for "sales.qvw" will be "sales.qvw.log". 

If you don't find the document log in either location, it means it is not enabled for the document. Open the QVW, Settings, Document Properties, General, check "Generate Logfile".  You will have to rerun the task at this point to get a logfile. 

Every document should have a logfile. It drives me crazy that it's not the default.  You can make it your default for future new qvws by updating Settings, User Preferences, Design, "Always use logfile for new documents". 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

nahuel04
Contributor II
Contributor II
Author

thanks Rob again.

I attached my log , I don't understand what it's happening, because in  QVW it work properly and from the management console doesn't work.

my script:

Sub GetFiles(vPath)

For each vFile in FileList('$(vPath)*.*')
ARCHIVOS_Indacor:
Load
UPPER(RIGHT('$(vFile)', LEN( TRIM('$(vFile)')) - INDEX('$(vFile)', '.', -1))) AS EXTENSION ,
RIGHT('$(vFile)', LEN( TRIM('$(vFile)')) - INDEX('$(vFile)', '\', -1)) AS ARCHIVO_CORTO ,
'$(vPath)' AS CARPETA ,
'$(vFile)' AS ARCHIVO_LARGO ,
NUM(FileSize('$(vFile)') / 1024, '#.##0 kB') AS TAMAÑO ,
FileTime('$(vFile)') AS FECHA
AutoGenerate(1) ;
Next

End Sub

Call GetFiles('\\192.168.10.152\Fotos\Compras\dbIndacor\');

thanks

 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It looks to me like zero files are being found in the FileList() function when run on the server.  Best guess is that the account running the Distribution Service does not have permission to list files in that directory.

-Rob

 

nahuel04
Contributor II
Contributor II
Author

thanks so much,
I have been trying to fix it for more than 6 hours and the problem was a permission in the directory, but this has permission. I do not know what it is, but I solved it copy all files to another directory and it works properly.

thanks for your time..