4

我在 Mac OSX 中使用 Textmate 2.0,每次运行脚本时都无法停止打印错误消息。它一直在说:

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

我所做的只是将值添加/usr/local/bin/python3到“首选项”菜单中的TM_PYTHON变量中。

有谁知道发生了什么?

4

1 回答 1

7

TextMate的 Python 包在幕后做了一些时髦的事情,以便能够拦截解释器输出和其他好东西。在这样做的过程中,它似乎在 Python 3.4 中遇到了一个不完整的修复,以便reload()在 Python 3.3 的 new importlib. 我已经为它在 Python 错误跟踪器上打开了一个问题

同时,如果您愿意,您应该能够通过在Python 3.4sitecustomize.py的目录中创建一个虚拟文件来消除消息。sys.path例如,在终端 shell 中,运行:

echo '' > $(/usr/local/bin/python3.4 -c 'import site; print(site.getusersitepackages())')/sitecustomize.py
于 2014-05-31T02:20:16.900 回答