python - maya.standalone.initialize() 永远挂起

标签 python maya

重复步骤:

gfixler@gigabox:/autodesk/maya2012-x64/bin$ ./mayapy
Python 2.6.4 (r264:75706, Nov  3 2009, 14:09:42) 
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import maya.standalone
>>> maya.standalone.initialize() # this hangs until I ^C
^CResult: untitled
Fatal Error. Attempting to save in /usr/tmp/gfixler.20120908.1953.ma
gfixler@gigabox:/autodesk/maya2012-x64/bin$

我认为这是某种库路径问题,但我不知道如何找出答案。

最佳答案

我发现了这个问题。

在尝试解决这个问题时,我了解了 python -m trace --trace script.py,还了解了一些关于 pdb(一个 Python 调试器)的知识。我通过在包含以下内容的文件上调用跟踪将它们联系在一起:

pdb.run(maya.standalone.initialize(), globals(), locals())

我不知道这是使用不正确还是过度杀伤(在打印出大量信息后,仅跟踪被挂起,这些信息重定向到文件中没有产生任何有用的结果),但是在点击 n (下一步)和 s (步骤),然后在 pdb 中按了数百次 Enter 按键,我一无所获,一时兴起,我输入了 help 并得到了帮助菜单。我决定尝试列出的 EOF 命令,它一直运行,直到崩溃并显示一条有关无法加载 commandPort 的消息。我记得上周我在与 Nose 战斗时将该值设置为自动加载(首选项窗口,应用程序部分),显然这导致它卡在错误的条目(“:12345”)上,并且绝对没有任何消息。我打开 UI Maya,删除了该首选项,现在 mayapy 初始化正常。噗。

关于python - maya.standalone.initialize() 永远挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12336183/

相关文章:

c++ - 在 maya API 中计算 worldMatrix

python - 重命名重复对象失败

python3.6 : equivalent of %d %s using the format: f("string {var1} {var2})

python - 在 Pandas 中使用 groupby 来计算一列中与另一列相比的内容

玛雅中的 python : get all attributes

python - Maya Python 镜像问题

python - 训练集的不同 MSE 结果

python - 如何避免过多地使用 'self'

python - Django 休息框架 : testing update action doesn't return 400 if request data is invalid

python - 如何在maya中使用python在函数之间传递变量?