Announcement

Collapse
No announcement yet.

Unable to run report - fatal script error

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to run report - fatal script error

    I have a script that won't print on a client server set up.

    Here are the two versions of the script:
    **This one DOES NOT work**
    @echo off
    echo ***** COMPARING FILES *****
    set scriptPath="C:\Users\Administrator\Desktop\RXCompa reHtmlIgnore.txt"
    set hostPath="C:\ComparisonFilesServer\67680.rx"
    set guestPath="\\VBOXSVR\ComparisonFilesServer\67680.r x"
    set reportPath="C:\Users\Administrator\Desktop\My Report.html"
    REM Keep spaces in front of file paths and carets at the ends. Also, there can be no spaces after carets.
    BComp.exe @%scriptPath% %hostPath% %guestPath% %reportPath% //start "" "My Report.html"

    **This one DOES work**
    @echo off
    echo ***** COMPARING FILES *****
    set scriptPath="C:\Users\robert.minardi\Desktop\Deskto p\Comparison Files\RX_Incoming\RXCompareHtmlIgnore.txt"
    set originalPath="C:\Users\robert.minardi\Desktop\Desk top\Comparison Files\RX_Incoming\Original.rx"
    set alteredPath="C:\Users\robert.minardi\Desktop\Deskt op\Comparison Files\RX_Incoming\Altered.rx"
    set reportPath="C:\Users\robert.minardi\Desktop\Deskto p\Comparison Files\RX_Incoming\My Report.html"
    REM Keep spaces in front of file paths and carets at the ends. Also, there can be no spaces after carets.
    BComp.exe @%scriptPath% %originalPath% %alteredPath% %reportPath% //start "" "My Report.html"

    The only real difference is that one is accessing a file across a network and the variable names are slightly different.

    I'm not getting a "cannot find file" error, I'm getting a "can't create report error"

    Also, here's the report script:
    text-report layout:side-by-side &
    options:ignore-unimportant,display-context,display-mismatches &
    output-to:"%3" output-options:html-color "%1" "%2"

    Any thoughts on why this is happening?

    Thanks,
    Rob
    Last edited by rmnrdi; 08-Aug-2018, 08:58 AM.

  • #2
    Hello,

    I am going to guess you cannot edit/create files in the Administrator's folder under certain conditions. Windows likes to lock this user down, so if there's any factor where the automated user cannot access it (especially if the automation is executed as a different user, but even if running as the Administrator account, it would not prompt for UAC) it could lead to problems. Try updating the report path to something any user could have read/write access to, such as "c:\temp" to avoid any privileges issues.

    If that does not work, the next test is to run the script outside of the bat file, and from the graphical command line directly as the Windows User Account that would run the above script, but with literal string paths used:

    bcompare.exe "@C:\Users\Administrator\Desktop\RXCompa reHtmlIgnore.txt" "C:\ComparisonFilesServer\67680.rx" "\\VBOXSVR\ComparisonFilesServer\67680.r x" "C:\temp\My Report.html"

    What does this report?
    Aaron P Scooter Software

    Comment


    • #3
      Same thing. Fatal script error and unable to print. Via cmd, batch or moving the files to temp on the C drive
      For the host system I'm running Windows Server 2016 and Windows 10 for the VM

      Comment


      • #4
        UPDATE: It wouldn't except the network path. I had to use the mapped drive letter as the root of the path.

        As always, thanks for your time Aaron.

        I will say though, that's a pretty terrible error. It's saying the report can't print when it was a file path issue.

        Why didn't is say "file not found" or something that correctly describes what happened?
        Last edited by rmnrdi; 08-Aug-2018, 03:03 PM.

        Comment


        • #5
          Hello,

          Which path was the trouble path? BC4 supports both \\share\folder or drive letter syntax (on Mac/Linux, smb://share/folder/). What is the exact log/error text?
          Aaron P Scooter Software

          Comment


          • #6
            It was the \\share\folder path that gave me the issue.

            Where exactly is this log I need to look at?

            Comment


            • #7
              In your original post, there is a space in the file extension:
              set guestPath="\\VBOXSVR\ComparisonFilesServer\67680.r x"
              If "r x" in the extension is changed to "rx" does that fix the problem?

              If it doesn't, please share the exact error text if displayed in the scripting window.

              If you've turned on logging in the script with "log verbose c:\log.txt" at the beginning of the script, errors will also be written to the specified file.
              Chris K Scooter Software

              Comment


              • #8
                I can't seem to reproduce it with the \\network\share path. I'm not sure what I was doing wrong, but I'm not doing it wrong anymore.

                Thanks, but I think it's taken care of.

                BTW, I like the log feature. I'm going to have to remember that one.

                Comment

                Working...
                X