Logo Questions Linux Laravel Mysql Ubuntu Git Menu

Error output in Textmate 2 using Python 3.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?

like image 340
rodrigoburg Avatar asked Mar 20 '23 11:03


1 Answers

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
like image 179
Ned Deily Avatar answered Mar 24 '23 06:03

Ned Deily