Scripts only run from the console (W10, Resolve 16.2.6.005)

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

flaccid_parakeet

  • Posts: 2
  • Joined: Wed Sep 16, 2020 1:43 am
  • Real Name: Rich Pav

Scripts only run from the console (W10, Resolve 16.2.6.005)

PostWed Sep 16, 2020 1:47 am

I asked on the Reactor forum but didn't get a reply. I'm trying to run Lua scripts but they only run if I paste them into a console window. The problem is with Resolve, not with Reactor.

I'm running Windows 10 Pro, Version 1909, OS Build 18363.1082, Davinci Resolve 16.2.6.005. Ryzen 5 1600, 16GB RAM, B350 Tomahawk motherboard.

When I drag Reactor-Installer.lua onto the Fusion Console, nothing happens. For what it's worth, if I launch Resolve as Administrator and try, I get a "NO" symbol.

If I paste the contents of Reactor-Installer.lua into the console, it launches and installs, but at the last step it doesn't open Reactor. Instead, it opens File Explorer to C:\ProgramData\Blackmagic Design\DaVinci Resolve\Fusion\Reactor\System

After quitting and relaunching Resolve, Workspace --> Scripts is empty. But I managed to fix that by copy-pasting the contents of C:\ProgramData\Blackmagic Design\DaVinci Resolve\Fusion\Reactor\System\Reactor.lua into a console. That finally opened Reactor, and a bunch of stuff got updated.

So now that I have the Workspace --> Scripts --> Reactor menu, the only items that work when I select them are the ones in the Resources submenu. All the other ones, which I assume are LUA scripts, don't work. I select them but nothing happens. I can only open Reactor by copy-pasting Reactor.lua into the console.

Looks like installing stuff from the Reactor menu works (I installed Hypertext Compositor and Kickass ShaderZ), but again, the only scripts that run (after restarting Resolve) are ones that open browser windows.

I completely disabled Windows Firewall so that doesn't seem to be the problem. I also turned off Malwarebytes and Virus and Threat Protection in Windows Security.
Offline
User avatar

Dwaine Maggart

Blackmagic Design

  • Posts: 7870
  • Joined: Wed Aug 22, 2012 2:53 pm

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostWed Sep 16, 2020 3:14 am

If you are using the free version of Resolve, external scripts are not supported. Only scripts entered into the Console window.
Dwaine Maggart
Blackmagic Design DaVinci Support
Offline

flaccid_parakeet

  • Posts: 2
  • Joined: Wed Sep 16, 2020 1:43 am
  • Real Name: Rich Pav

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostThu Sep 17, 2020 1:57 am

Dwaine Maggart wrote:If you are using the free version of Resolve, external scripts are not supported. Only scripts entered into the Console window.


On the page comparing free vs paid, under "Extensibility" it says both free and paid support scripts. Nothing about external scripts. The only scripting-related difference between the two is "Scriptable automation tasks using the Fusion scripting engine to control features."

I was able to install Reactor on my Mac running the free version of Resolve. Why is that?
Offline
User avatar

Dwaine Maggart

Blackmagic Design

  • Posts: 7870
  • Joined: Wed Aug 22, 2012 2:53 pm

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostFri Sep 18, 2020 9:11 am

From the Resolve manual, page 125:

‚‚ External Scripting Using: (Resolve Studio only) Options include None, Local, and
Network. When set to None, only scripting in the Console window is allowed. When
set to Local, external scripts and applications on the same computer can control
DaVinci Resolve. When set to Network, external scripts and applications from other
computers on the network (or via the internet) can control DaVinci Resolve.
Dwaine Maggart
Blackmagic Design DaVinci Support
Offline

pinthenet

  • Posts: 111
  • Joined: Mon May 18, 2020 3:23 pm
  • Location: Switzerland
  • Real Name: John Payne

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostTue Sep 22, 2020 10:07 am

I've got the same problems on Windows - I see the scripts in the Workspace/Scripts menu but nothing happens when I try to run them, not even an error in the log, but I can run them from the console with copy/paste.

I previously used the free version but upgraded to Studio a few weeks ago. I uninstalled the free version but could it be that something remained that is blocking scripting? I tried Local & Network options in the General settings.

In my Linux environment (only Studio installed) Scripting works from the menu
[size=85]i7-6700K 4GHz/32GB/GTX1660Ti 6GB
Windows 10 Pro: NVIDIA 462.31 Studio; Resolve 17.1.1 Studio; Fusion 17.1.1 Studio
Offline
User avatar

iddos-l

  • Posts: 499
  • Joined: Sat Mar 30, 2019 7:55 pm
  • Real Name: iddo lahman

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostTue Sep 22, 2020 11:57 am

pinthenet wrote:I've got the same problems on Windows - I see the scripts in the Workspace/Scripts menu but nothing happens when I try to run them, not even an error in the log, but I can run them from the console with copy/paste.

I previously used the free version but upgraded to Studio a few weeks ago. I uninstalled the free version but could it be that something remained that is blocking scripting? I tried Local & Network options in the General settings.

In my Linux environment (only Studio installed) Scripting works from the menu

Were you able to run it from the command line outside of resolve?


Sent from my iPhone using Tapatalk
Offline

pinthenet

  • Posts: 111
  • Joined: Mon May 18, 2020 3:23 pm
  • Location: Switzerland
  • Real Name: John Payne

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostTue Sep 22, 2020 12:07 pm

I just tried a simple 'hello world' script and that worked via fuscript. That's also a script that appears in the menu but won't run
[size=85]i7-6700K 4GHz/32GB/GTX1660Ti 6GB
Windows 10 Pro: NVIDIA 462.31 Studio; Resolve 17.1.1 Studio; Fusion 17.1.1 Studio
Offline

pinthenet

  • Posts: 111
  • Joined: Mon May 18, 2020 3:23 pm
  • Location: Switzerland
  • Real Name: John Payne

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostTue Sep 22, 2020 1:13 pm

One interesting thing: I also installed Reactor, that's how I came to realise that scripting wasn't working. However when I select Scripts/Reactor/Resources all the entries work - the corresponding web pages are opened. No other Reactor options work
[size=85]i7-6700K 4GHz/32GB/GTX1660Ti 6GB
Windows 10 Pro: NVIDIA 462.31 Studio; Resolve 17.1.1 Studio; Fusion 17.1.1 Studio
Offline

pinthenet

  • Posts: 111
  • Joined: Mon May 18, 2020 3:23 pm
  • Location: Switzerland
  • Real Name: John Payne

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostTue Sep 22, 2020 7:01 pm

It seems to be a problem with the installation - I installed DR Studio on another PC that had only had a recent free version, before I uninstalled it for Studio. Scripts work fine there.

On my main PC I have had Resolve 15, 16 Beta & various 16.x Free versions so I may have a mess. I just reinstalled Studio 16.2.7 but didn'0t delete the %APPDATA% stuff, I'll try that next. I tried to compare the folders on the 2 machines but couldn't really spot anything.
[size=85]i7-6700K 4GHz/32GB/GTX1660Ti 6GB
Windows 10 Pro: NVIDIA 462.31 Studio; Resolve 17.1.1 Studio; Fusion 17.1.1 Studio
Offline

pinthenet

  • Posts: 111
  • Joined: Mon May 18, 2020 3:23 pm
  • Location: Switzerland
  • Real Name: John Payne

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostTue Sep 22, 2020 7:40 pm

This time I uninstalled (via control panel) again, deleted/renamed all Blackmagic foders - Program Files, %PROGRAMDATA%, %APPUSER% and resinstalled. Scripts still don't start....

Anyone got any ideas?
[size=85]i7-6700K 4GHz/32GB/GTX1660Ti 6GB
Windows 10 Pro: NVIDIA 462.31 Studio; Resolve 17.1.1 Studio; Fusion 17.1.1 Studio
Offline
User avatar

Igor Riđanović

  • Posts: 1016
  • Joined: Thu Jul 02, 2015 5:11 am
  • Location: Los Angeles, Calif.

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostWed Sep 23, 2020 1:16 am

Can you post the Hello World script in it's entirety here?
www.metafide.com - DaVinci Resolve™ Apps
Offline

pinthenet

  • Posts: 111
  • Joined: Mon May 18, 2020 3:23 pm
  • Location: Switzerland
  • Real Name: John Payne

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostWed Sep 23, 2020 9:05 am

Couldn't be much simpler:

helloworldlua.lua
Code: Select all
print('hello world')

I 'created'a python version helloworld.py with simlar contents.

I also installed the changes strings script from Noah Haenel https://www.youtube.com/watch?time_continue=377&v=gonx4zJD1us&feature=emb_logo - this also doesn't work and produces no console output on the faulty PC, but works on the other installations.

Everything works on the 2nd Windows PC & Ubuntu system. 2nd Windows PC has a similar setup incl. the same Firewall/Virus SW (G Data Internet Security), same DR & NVIDIA driver versions. Standard DR installation on C:\

Reactor also works on the 2nd Windows PC.
[size=85]i7-6700K 4GHz/32GB/GTX1660Ti 6GB
Windows 10 Pro: NVIDIA 462.31 Studio; Resolve 17.1.1 Studio; Fusion 17.1.1 Studio
Offline
User avatar

iddos-l

  • Posts: 499
  • Joined: Sat Mar 30, 2019 7:55 pm
  • Real Name: iddo lahman

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostWed Sep 23, 2020 9:22 am

How do you instantiate the resolve object?
Or the fusion class?

Working outside of the console you need to get the fusionscript module.


Sent from my iPhone using Tapatalk
Offline

pinthenet

  • Posts: 111
  • Joined: Mon May 18, 2020 3:23 pm
  • Location: Switzerland
  • Real Name: John Payne

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostWed Sep 23, 2020 10:52 am

In the hello world scripts I don't, they only contain the print statement. On the 2nd PC it prints 'hello world' to the console, on the 1st PC nothing appears, neither are there any WARN/ERROR or INFO messages in the DR log to indicate why the script doesn't start.

Apart from my hello world scripts I also installed
a DR Developer\Examples scripts - 5_get_project_information;
one of Igor's scripting example scripts - ResolveClipLister.py;
the ChangeStrings script mentioned earlier.

These are 'complete' DR scripts that do something useful and work fine on the 2nd PC but don't seem to even start on the 1st PC. The ChangeStrings clip prints lots of output to the console, even before instantiating the resolve object etc - this text appears on the 2nd PC but not the first.

Normally I would suspect a permissions problem with the scripts folder but it looks correct and DR finds the scripts to put them in the menu.

For completeness: if I copy/paste any of the scripts directly in to the Console they work (both PCs)
[size=85]i7-6700K 4GHz/32GB/GTX1660Ti 6GB
Windows 10 Pro: NVIDIA 462.31 Studio; Resolve 17.1.1 Studio; Fusion 17.1.1 Studio
Offline
User avatar

roger.magnusson

  • Posts: 1725
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostWed Sep 23, 2020 1:17 pm

The devil is in the details... There's a relevant discussion of scripting in the free version here.

I've had success in running scripts from the Scripts menu in the free version of Resolve by using the "app" object. You just can't run scripts using the external fuscript.exe command. print('hello world') works because it doesn't use a Resolve object.
Offline

pinthenet

  • Posts: 111
  • Joined: Mon May 18, 2020 3:23 pm
  • Location: Switzerland
  • Real Name: John Payne

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostWed Sep 23, 2020 1:25 pm

I'm using Studio on both PCs - scripts work on one PC but not the other
[size=85]i7-6700K 4GHz/32GB/GTX1660Ti 6GB
Windows 10 Pro: NVIDIA 462.31 Studio; Resolve 17.1.1 Studio; Fusion 17.1.1 Studio
Offline
User avatar

Igor Riđanović

  • Posts: 1016
  • Joined: Thu Jul 02, 2015 5:11 am
  • Location: Los Angeles, Calif.

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostWed Sep 23, 2020 10:20 pm

You're not calling the API at all with that script. That should work.

Here's an interesting thing. I'm not sure how scripts are evaluated for language in the internal context. I can run dropdown menu scripts in my Resolves and they always use the Python 2 interpreter.

The syntax of your statement is good with both Lua and Python 3. Without a shebang line I have no idea how Resolve knows which interpreter to use. I don't use Lua, but I think I have tried running Lua scripts from the dropdown menu a while ago and they worked. Maybe Resolve parses the script looking for the language syntax to determine which interpreter to use.

Try running a non-ambiguous statement that's clearly Lua.
www.metafide.com - DaVinci Resolve™ Apps
Offline

pinthenet

  • Posts: 111
  • Joined: Mon May 18, 2020 3:23 pm
  • Location: Switzerland
  • Real Name: John Payne

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostThu Sep 24, 2020 6:50 am

I'd assumed Resolve checks the script's extension, .lua/.py, to decide which interpreter. Under Fusion/Fusion Settings/Script you can define the default python. In most python script examples I've seen the shebang is linux-specific - it's a little more complicated in Windows. As far as I understand the lua interpreter is embedded in Resolve.

The question still remains: why do scripts run from the Workspace/Scripts menu everywhere in the world except on 1 of my PCs, which seems to be setup correctly. Maybe I'll have to send an email directly to support.

Thanks for everyone's inputs by by the way
[size=85]i7-6700K 4GHz/32GB/GTX1660Ti 6GB
Windows 10 Pro: NVIDIA 462.31 Studio; Resolve 17.1.1 Studio; Fusion 17.1.1 Studio
Offline

pinthenet

  • Posts: 111
  • Joined: Mon May 18, 2020 3:23 pm
  • Location: Switzerland
  • Real Name: John Payne

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostMon Oct 19, 2020 9:38 am

Just for the record, in case anyone ever has the same issue.

After trying many things with BMD support, by chance I came accross this http://www.bryanray.name/wordpress/fusion-9-start-up-troubleshooting/ from Bryan Ray in 2018, which mentioned a conflict with Synology's cloud backup SW. I also use Synology's Cloud backup so I stopped the service and found that this was indeed causing the problem.

If I stop the "Cloud Station Backup VSS Service x64", even after starting DR, then scripts work correctly.
I can then start the service again when I quit DR (or even before if I'm not using scripts).

It was quite a relief to find such a simple solution after months of not being able to run scripts normally.
Thanks also to Bryan.
[size=85]i7-6700K 4GHz/32GB/GTX1660Ti 6GB
Windows 10 Pro: NVIDIA 462.31 Studio; Resolve 17.1.1 Studio; Fusion 17.1.1 Studio
Offline
User avatar

sturmen

  • Posts: 15
  • Joined: Mon Jul 29, 2019 3:53 pm
  • Location: New York, NY
  • Real Name: Nicholas Tinsley

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostThu Mar 04, 2021 8:49 pm

FYI this caused the same problem on my machine, and also the service has been renamed to "Synology Drive VSS Service x64".
Offline

Caspersn

  • Posts: 1
  • Joined: Sat Feb 27, 2021 8:05 am
  • Real Name: Casper Schmidt-Nielsen

Re: Scripts only run from the console (W10, Resolve 16.2.6.0

PostMon Apr 12, 2021 8:24 pm

Hi. I really dont understand this...

I'm using DRv17 on win10. Trying to install Reactor, but it stops at step 7.
I have a Synology NAS, but I cannot see or know how to stop the "cloud station...".

Can anyone help a newbie :-)?

Thx :-)

Return to DaVinci Resolve

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot], Simon Golob and 66 guests