5 Replies Latest reply: Dec 8, 2017 5:58 AM by Magnus Berg RSS

    File not exists warnings

    Piotr Gora

      In the file LoadAll.qvs the include is outside of the if clause, this generates a file does not exists warning every time the load script is run, is there any reason why it's not in the if -> else code block? By moving the "$(Include=$(vG.QVCDisable));" to the else block of the if clause we removed the warning.

        • Re: File not exists warnings
          Felip Drechsler

          Hi Piotr,


          Can you show what error your getting on your screen and where?

          The include should not give a error message, Must_include does if it does not finds the file its referencing.

          So, if the inlcude doesn't find it, it just wont load up what the file has in it.

           

          Felipe.

            • Re: File not exists warnings
              Piotr Gora

              Hi

              I don't get any errors in ux, I see the warning in the server logs as well as Windows Event Viewer. The reason for my investigation of the warning is a different error (also only in logs and windows events) that occurs at the same time as I'm running the data load script. We get a: "CFXFileSize::EvalDual: Unexpected exception" which I believe is somehow related to Qlik trying evaluate the size of a file which probably does not exists, but this is only a guess.

               

              /Piotr

                • Re: File not exists warnings
                  Magnus Berg

                  Hi Piotr, that if the QlikView Component file (qvc.qvs), it's used automatically when added into the sub folder, that's why it's an extra line. as its a function inherited we can't have any if statements validating. You can turn it of by adding  vG.QVCDisable ='true' in the top of your script. Or by adding the qvc.qvs add on (done in Deploy tool).

                  Hope that this helped?

                  Regards

                  Magnus

                    • Re: File not exists warnings
                      Piotr Gora

                      The original LoadAll.qvs looks like this:

                       

                      if trim(lower('$(vG.QVCDisable)'))='true' then

                      // This is used to disable/enable QlikView Components library (Qvc)

                      // vG.QVCDisable = true removes Qvc.qvs filename

                      set vG.QVCDisable='$(vG.$(vL.QDF.LinkShared_Folders)SubPath)';

                      else

                      // Not disabled will state the Qvc.qvs filename

                      set vG.QVCDisable='$(vG.$(vL.QDF.LinkShared_Folders)SubPath)Qvc.qvs';

                      endif

                       

                      $(Include=$(vG.QVCDisable));

                       

                      if we set the QVCDisable to true, the include will try to add a directory giving this warning/error:


                      OpenFileOrURL: An exception (badPath \\\\host.domain.com\\ShareDir\\Test\\2.Production\\3.Include\\4.Sub\\) occurred during open of \\\\host.domain.com\ShareDir\\Test\\2.Production\\3.Include\\4.Sub\\)


                      If we change the if to the following:


                      if trim(lower('$(vG.QVCDisable)'))='true' then

                      // This is used to disable/enable QlikView Components library (Qvc)

                      // vG.QVCDisable = true removes Qvc.qvs filename

                      set vG.QVCDisable='$(vG.$(vL.QDF.LinkShared_Folders)SubPath)';

                      else

                      // Not disabled will state the Qvc.qvs filename

                      set vG.QVCDisable='$(vG.$(vL.QDF.LinkShared_Folders)SubPath)Qvc.qvs';

                      $(Include=$(vG.QVCDisable));

                      endif

                       

                      No warning/error is generated.

                       

                      This was found while we were looking at why Qlik engine generates a (large) number of errors that look like this:

                      "CFXFileSize::EvalDual: Unexpected exception"

                      The theory is that some process in the engine tries to evaluate the size of a file that is not found....or?

                       

                      Regards

                      Piotr

                       

                       

                        • Re: File not exists warnings
                          Magnus Berg

                          You can't have a sub function include inside an if statement as it will be ignored. Thai's why its placed where it is, I can do a change in the installer removing the qvc lines completely when qvc not installed, the reason why it's like this is because Engine should ignore scripts not found when using Include. There is a special syntax called must_include to force read on the include.