I was trying to use latexindent.pl with the package BeautifyLatex in SublimeText 3 on OS X El Capitan . When I tried to save tex file, there was an error:

Error: can't specify None for path argument

I googled about this error. The path of latexindent.pl became the suspect. Typing which latexindent on the terminal, I saw latexindent installed.

$ which latexindent

Typing echo $PATH on the terminal, I saw the current path includes /Library/TeX/texbin, which contains latexindent. Any idea?


There's a well-known issue with command-line tools in GUI applications on OS X, starting with El Capitan. Basically, when launched from the Dock, Spotlight, etc. they inherit a very restricted PATH (this was true on earlier versions of OS X, but you could usually adjust it somehow). However, this can be easily fixed by installing the Fix Mac Path plugin, which ensures the PATH in ST is the same as the PATH in the terminal.

  • I did install Fix Mac Path. Unfortunately, the same error can't specify None for path argument still exists when I tried to save files. – semibruin Aug 26 '16 at 15:01
  • Hmmm... Do you get any more information with that error? – ig0774 Aug 27 '16 at 9:16
  • 1
    Have you added "additional_path_items": ["/Library/TeX/texbin"] to your User settings? – r-stein Aug 27 '16 at 13:13
  • 1
    @semibruin: the problem may be latexindent vs latexindent.pl, which you could test by running sudo ln -s /Library/TeX/texbin/latexindent.pl /Library/TeX/texbin/latexindent from the terminal. If that fixes things, this is a bug and should be reported to the BeautifyLatex project. – ig0774 Aug 28 '16 at 21:21
  • 1
    @ig0774 Great! It works now. A minor thing is that I assumed you meant sudo ln -s /Library/TeX/texbin/latexindent /Library/TeX/texbin/latexindent.pl. To fix this problem, I need three items. (I did experiment, and found that all three are necessary.) The first is to install Fix mac path (@ig0774). The second is to add the path "additional_path_items": ["/Library/TeX/texbin"] to the User settings of BautifyLatex. (@r-stein). The last is to execute the link between latexindent and latexindent.pl. Thanks all very much. I will report this to the BeautifyLatex project. – semibruin Aug 29 '16 at 9:31

Just a quick heads-up here... in Sierra this path business is, again, messy. Indeed using Fix Mac Path, adding the proper path to the user preferences, and finally doing the symbolic link, still results in the dreaded None

I'm drilling down through the whole mess now and will report back if I ever manage to decode what they've done this time :)

  • Sorry to comment on my own post... but... it appears that Popen doesn't work / blocks / hangs under Sierra, making the Fix Mac Path approach at path-fixing, fail. I'll post a bug report there once the 'official release' of Sierra hits the streets. – flip Sep 6 '16 at 20:54
  • Did you figure something out here? I have the same problem. Tried what is stated above, but still get the same error. – eivindml Sep 19 '17 at 18:53
  • 1
    @eivindml I did a fix here- github.com/flipphillips/BeautifyLatex – flip Sep 22 '17 at 1:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.