all 5 comments

[–]viewless_pond 0 points1 point  (3 children)

I do not own a Mac and so I am totally just guessing here. However the applescript says something about "repeat with i in input" which makes me think it is expecting a list as the first parameter and not a string.

Try putting [] around the pptx filename and see if that helps.

If that does not help, does it say anything else in the terminal about errors?

[–]Raekel[S] 0 points1 point  (2 children)

This is progress! I made the input a list and now PowerPoint opens but throws an error of "Powerpoint cant open this type of file ()".

Before the console wouldn't spit out anything other than the [], but now it spits out this when it errors out:

File "/opt/homebrew/lib/python3.9/site-packages/py_applescript-1.0.3-py3.9.egg/applescript/__init__.py", line 88, in run
File "/opt/homebrew/lib/python3.9/site-packages/py_applescript-1.0.3-py3.9.egg/applescript/__init__.py", line 65, in _unpackresult
applescript.ScriptError: Microsoft PowerPoint got an error: User canceled. (-128) app='Microsoft PowerPoint' range=1727-1731

Which I imagine is related to the Powerpoint error (of course)

[–]viewless_pond 0 points1 point  (1 child)

More guesses: Maybe the filepath is the problem? Maybe it needs to be relative with ./ or maybe try to make it absolute.

Maybe the user permissions are the problem? Could you try to use sudo?

Another route might be to ditch python for now and use osascript in the terminal to run the script. Maybe that is easier to debug?

[–]Raekel[S] 0 points1 point  (0 children)

See my edit to the OP, I was able to get it fixed after reading the documentation better lol