Python ImportError wtih OBS 32.2.2

MBiddiscombe

New Member
I upgraded to 32.2.2 today on Windows, and a Python script I've been using for 6+ years (that registers some hotkeys and uses them to control the active PowerPoint presentation) now fails with an ImportError.
[ppt_slide.py] Traceback (most recent call last):
[ppt_slide.py] File "C:/Program Files/obs-studio/data/obs-plugins/frontend-tools/scripts\ppt_slide.py", line 3, in <module>
[ppt_slide.py] import win32com.client
[ppt_slide.py] File "C:\Program Files\Python36\lib\site-packages\win32com\__init__.py", line 5, in <module>
[ppt_slide.py] import win32api, sys, os
[ppt_slide.py] ImportError: DLL load failed: The specified module could not be found.

(I have several python versions installed on my PC: 2.7, 3.6 and 3.13. I have no idea which of those OBS was using previously. Might the upgrade have caused it to pick a different version?

Then (separately), if I go to Tools > Scripts , select the script and hit Edit Script, nothing happens. (Well, that's not entirely true: there's a very brief flicker of a (console?) window onscreen, but no editor opens, and the window disappears, so you can't see whether that was reporting an error...)

Ideas?
 
OBS is running python 3.6:
1787418671104.png


However, if I run python 3.6 directly, the import succeeds:
C:\Users\Martin>"C:\Program Files\Python36\python.exe"
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32com.client
>>>

So, something about the way OBS is invoking/embedding python is causing the import failure...
 
Back
Top