Topic: SVP and Vapoursynth receiving an error in script on execution

Error Seen:
Script Error execpted '('
[C:\Users\...\SVP4\scripts\b4d008a0.py, Line 7, Column 6]

# This script was generated by SVP 4 Manager.
# Check https://www.svp-team.com for more details.

import vapoursynth as vs
core = vs.get_core(threads=25)

if not hasattr(core,'svp1'):
    core.std.LoadPlugin("C:\\Program Files (x86)\\SVP 4\\plugins64\\svpflow1_vs.dll")
if not hasattr(core,'svp2'):
    core.std.LoadPlugin("C:\\Program Files (x86)\\SVP 4\\plugins64\\svpflow2_vs.dll")

The issues is with line 7, so: if not hasattr(core,'svp1'):
"C:\\Program Files (x86)\\SVP 4\\plugins64\\svpflow1_vs.dll"
and
"C:\\Program Files (x86)\\SVP 4\\plugins64\\svpflow2_vs.dll"
Do exist and the path seems correct, so the issue is with hasattr

I edited to:

#if not hasattr(core,'svp1'):
core.std.LoadPlugin("C:\\Program Files (x86)\\SVP 4\\plugins64\\svpflow1_vs.dll")
#if not hasattr(core,'svp2'):
core.std.LoadPlugin("C:\\Program Files (x86)\\SVP 4\\plugins64\\svpflow2_vs.dll")

Ok that is just a plain simply hack (comment out what is throwing an error), but it worked.

ERIC

Re: SVP and Vapoursynth receiving an error in script on execution

what else installed? another Python version probably?

3 (edited by egandt 11-10-2021 20:05:38)

Re: SVP and Vapoursynth receiving an error in script on execution

Yes actually Python 3.10 is installed, was using for something else, however to trouble shoot it was removed.

Python for Windows: python-3.10.0-amd64

Located in: C:\Users\<user>\AppData\Local\Programs\Python\Python310

However I did checking that it was not in the path (the default is python 3.8) so the one from SVP4.  Yet since there was still an issue, I removed it and restarted, then reapplied the settings from SVP4 to be sure it was being used and again rebooted.

Next I go to the player and set vapoursynth filter to preferred, see attached and it is not used, if I enabled the avisynth (image) plugin then I get the error above.  Now there is no other python installed and I rebooted after removal and then re added the path and rebooted again to be sure. so I can not think of anything else to do.

To test further I tried:

C:\1>Python 24ac8308.py
24ac8308.py:5: DeprecationWarning: get_core() is deprecated. Use "vapoursynth.core" instead.
  core = vs.get_core(threads=25)
Traceback (most recent call last):
  File "24ac8308.py", line 12, in <module>
    clip = VpsFilterSource
NameError: name 'VpsFilterSource' is not defined

So this is odd it gets further than it does when called via the player in that it has an issue on line 12, which seems right as "VpsFilterSource" is not currently defined, but then why does the script have an issue when loaded through the player yet works on the command line? 

Path=C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files\Adaptec\maxView Storage Manager\pegasus\bin;C:\Program Files\Adaptec\maxView Storage Manager\;C:\Program Files\Adaptec\maxView Storage Manager\ssl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\SVP 4\mpv64

both should be using the same python as it is now the only copy installed, I confirmed there are 2 of them one 32bit and another 64 both installed by SVP4, but to be 100% sure I also renamed the 32bit one to python.exe.org to ensure the 64bit one was being called.

Note this is PotPlayer64 bit "PotPlayerMini64.exe", so it is a 64bit application, as obviously it 32bit then it could not work.

ERIC

Re: SVP and Vapoursynth receiving an error in script on execution

So I've been working on this and now I still see in the logs:

18:23:16.305 [i]: AVSF: found new player instance
18:23:16.338 [i]: AVSF: filters in use: LAV Splitter Source -> LAV Video Decoder -> AviSynth Filter -> * -> Madshi Video Renderer
18:23:16.341 [i]: AVSF: new video in PotPlayerMini64.exe (64-bit) [PotPlayer 0.0.0.0] on screen 1
18:23:16.391 [i]: Media: video 1920x1080 [PAR 1.000] at 23.976 fps
18:23:16.391 [i]: Media: codec type is AVC, YUV/4:2:0/8 bits
18:23:16.393 [i]: Playback: starting up...
18:23:16.399 [i]: Playback [9ba355f2]: Frame server (64-bit) C:\Program Files (x86)\SVP 4\mpv64\vapoursynth.dll
18:23:16.400 [i]: Playback [9ba355f2]: resulting video frame 1920x1080
18:23:16.401 [i]: Playback [9ba355f2]: 2 acceptible profiles, best is 'Anime_SubsPlease' [100]
18:23:16.402 [i]: Playback [9ba055de]: disabled while video is paused
18:23:16.404 [i]: Playback [9ba355f2]: enabled while video is playing
18:23:16.405 [i]: Profile: using automatic profile #1 /animation
18:23:16.407 [i]: Playback [9ba355f2]: playing at 59.94 [23.976 *5/2] 
18:23:16.412 [E]: Playback [9ba055de]: VS - Script error: expected `('\n(C:\Users\htpc user\AppData\Roaming\SVP4\scripts\9ba055de.py, line 7, column 6)

SVP4 shows, see attached, 2 videos same name one active and one inactive, any idea what is happening?  and why?

ERIC

Post's attachments

zw6NOBPg5Y.jpg, 12 kb, 306 x 213
zw6NOBPg5Y.jpg 12 kb, 149 downloads since 2021-10-12 

Re: SVP and Vapoursynth receiving an error in script on execution

"AVSF: filters in use: LAV Splitter Source -> LAV Video Decoder -> AviSynth Filter -> * ->"

why the hell you're putting both Avisynth and Vapoursynth filters simultaneously? hmm

Re: SVP and Vapoursynth receiving an error in script on execution

Notice I'm still getting:
Playback [9ba055de]: VS - Script error: expected `('\n(C:\Users\htpc user\AppData\Roaming\SVP4\scripts\9ba055de.py, line 7, column 6)
which is the line: "if not hasattr(core,'svp1'):"

However I've ensured that the I have only 1 copy of python and it works on the command line on through SVP am I seeing it (see above).  I was also having an issue with Windows 11 and AviSynth so I had removed that, now it is back again, so yeah not sure why I had both enabled, but the python error is still a problem even then.