0

I am having trouble with generating a QT .mov in Mac Lion. The (longer) script uses QTKit from python takes a sequence of images and builds a movie. The following is boiled down to get straight to the error. The following succeeds on one machine (Macbook) running Snow Leopard, but fails on the new machine (MBPro, with Lion 10.7.2) (where I need it).

#!/usr/bin/python

import objc
from QTKit import *

movpath = './temp.mov'

mov, err = QTMovie.alloc().initToWritableFile_error_(movpath, None)

if mov == None:
  print "Could not create movie file: %s" % (movpath)
  print err

On my Lion machine, I get

Could not create movie file: ./temp.mov
Error Domain=NSOSStatusErrorDomain Code=-5000 "You do not have sufficient permissions for this operation." (Insufficient access privileges for operation ) UserInfo=0x7fdafb50a180 {NSLocalizedDescription=You do not have sufficient permissions for this operation.}

Both are using /usr/bin/python which is the standard Mac install of python

1 Answers1

0

I had a similar problem. I fixed it by running the script as superuser (sudo ./script.py) and writing the whole path to the outputfile. That is, movpath = "/whole-path-to-file/temp.mov". Interestingly none of these things alone seemed to fix the problem, only when I used both the script worked. Good luck