Dataclay — Automating Digital Production
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Register
    • Login

    Issue getting Shell commands to run

    Scheduled Pinned Locked Moved
    Templater Event Scripts
    2
    7
    793
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • yansfeldundefined
      yansfeld
      last edited by

      Hey there! I’m having a real tough time getting my event script to run. The script works when run manually, but doesn’t seem to want to run properly when I run the bot. I think I can see the command line open momentarily but then it closes, and doesn’t run the script.

      I’ve tried the troubleshooting step of adding a logging file but it doesn’t get written to, so I don’t think the script is running at all. I’m trying to run something in Node, but have also tried a super simple plain .js script that didn’t work either.

      Attaching my command and log file. Anything obvious I’m doing wrong?

      log.png

      command.png

      1 Reply Last reply Reply Quote 0
      • ariestavundefined
        ariestav
        last edited by

        Hi! It may be that not all the necessary installation files ended up in the C:\ProgramData\Dataclay folder. Do you have the D_shell.exe file installed there? We are finding that because it’s not signed newer versions of Windows won’t install it. Can you share the contents of that directory with us?

        1 Reply Last reply Reply Quote 0
        • yansfeldundefined
          yansfeld
          last edited by

          Hey thanks for your response! Here is a screenshot of the directory. I do see the D_shell app in there. Let me know if you need any other information that could be helpful.

          directory-contents.png

          ariestavundefined 1 Reply Last reply Reply Quote 0
          • ariestavundefined
            ariestav @yansfeld
            last edited by

            @yansfeld That looks good — all the necessary files are present from installation. Can you try using the absolute path to the javascript file you are running? In the initial screenshot you show node "Desktop\TemplaterScript\postanimations.js" $out_name, but can you try node "C:\Users\myuser\Desktop\TemplaterScript\postanimations.js instead?

            We have seen cases where the %PATH% environment variable is different when running a shell script as opposed to running through a normal command terminal. You may want to also use the absolute path to the node.exe interpreter, too. For example, in the screenshot you have simpley node ... but you may want to try C:\ProgramFiles\node\bin\node.exe ... I’m not sure where you have node installed, but please try that and see if it helps.

            yansfeldundefined 1 Reply Last reply Reply Quote 0
            • yansfeldundefined
              yansfeld @ariestav
              last edited by

              @ariestav Awesome thanks for the ideas. I will try those out and get back to you!

              1 Reply Last reply Reply Quote 0
              • yansfeldundefined
                yansfeld
                last edited by

                Hello! I think the absolute paths seem to have fixed the issue. Of course, that doesn’t mean that my Javascript code is any good, but at least it seems to be running the script. Thanks for your help!

                1 Reply Last reply Reply Quote 0
                • ariestavundefined
                  ariestav
                  last edited by

                  Great to hear! Happy Rendering!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post