4

I'm using Textmate 2.0 in a Mac OSX and I can't get it to stop printing an error message every time I run a script. It keeps saying:

Error in sitecustomize; set PYTHONVERBOSE for traceback:
AttributeError: 'NoneType' object has no attribute 'name'

All I have done is to add the value /usr/local/bin/python3 to a TM_PYTHON variable in the Preferences menu.

Does anyone know what's going on?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343

1 Answers1

7

TextMate's Python bundle does some funky things behind the scene to be able to intercept the interpreter output and other good stuff. In doing so, it appears to be running into an incomplete fix in Python 3.4 for an import reload() regression in Python 3.3's new importlib. I've opened an issue on the Python bug tracker for it.

In the meantime, if you want to you should be able to make the messages go away by creating a dummy sitecustomize.py file in a directory on sys.path for your Python 3.4. For example, in a terminal shell, run:

echo '' > $(/usr/local/bin/python3.4 -c 'import site; print(site.getusersitepackages())')/sitecustomize.py
Ned Deily
  • 83,389
  • 16
  • 128
  • 151
  • I've also commented on the issue tracker for the TM Python bundle: https://github.com/textmate/python.tmbundle/pull/40 – Ned Deily May 31 '14 at 02:48