When our code calls “generate” to generate a TrueType font (in RobFont 1.6 build 1410152315),
we sometimes get the following error :
File “lib/fontObjects/robofabWrapper.pyc”, line 3834, in generate
File “lib/fontObjects/doodleFont.pyc”, line 909, in generate
File “lib/fontObjects/doodleFontCompiler/ttfCompiler.pyc”, line 575, in compile
File “shutil.pyc”, line 256, in rmtree
File “shutil.pyc”, line 254, in rmtree
OSError: [Errno 66] Directory not empty: ‘/var/folders/vk/6h2qct291rn53wdyxh2wzpw40000gp/T/tmppr3tfd’
It seems a bit weird. I’m not sure if that’s a bug in our code in RF.
The path to the temporary directory is not generated by our code, so my guess is that it is generated by RoboFont.
I hope you can take a few minutes to check if there may be some easy-to-fix bug in there? or maybe a workaround.
By the way, the temporary directory mentioned in the error message still exists after the exception is raised.
It contains an empty file:
$ ls -l tmppr3tfd
-rw-r–r– 1 username usergroup 0 Jun 10 13:45 compile.otf
Looking at this StackOverflow: http://stackoverflow.com/a/21966211/2037879
It looks like this error is reported by default upon trying to delete non-empty directory and may be bypassed by setting ignore_errors=True in rmtree parameters.