[Chimera-users] [External] import error from module: Togl
goddard at sonic.net
Fri Jul 25 10:06:56 PDT 2014
Chimera does not use your system Python nor does it use your system Python libraries normally. But maybe it is seeing those because you have an environment variable, maybe PYTHONPATH set. If you are running a bash shell on linux try the “set” command to list all the environment variables before running Chimera and see if anything specific to python appears.
Does chimera start without any command-line options?
You are right that it is strange that tkgui.py is being imported since that shouldn’t happen when using the —nogui flag. But possibly your script is calling some Chimera functionality that imports tkgui.py (even in nogui mode), hard to say without seeing your script. Also it would be much clearer if we had a full traceback showing all the function calls leading to the error — Python usually prints that, did it not give the full traceback in your case?
On Jul 25, 2014, at 9:28 AM, Mike Sivley wrote:
> I apologize in advance if this becomes too system-specific, as I believe an automatic update of our server's python libraries may be to blame for this error. However, my hope is that others may have run into the issue as well and have already found a solution.
> I have a python/chimera script that generates Chimera scenes with various annotations assigned to residues in a protein structure. This script worked without issue for several weeks. I returned from a week of vacation and now the script fails with the following error:
> ImportError: No module named Togl
> File "/ant2/Bush_eQTL/sivleyrm/bin/UCSF-Chimera64-2014-05-13/share/chimera/tkgui.py", line 73, in <module>
> import Togl
> Togl appears to be a deprecated library, so my best guess is that it was removed during some automatic update (possibly of PyOpenGL?) applied to our servers. However, Chimera is distributed with its own python executable and libraries, so I'm unsure how this type of change could have affected it. I am using the nightly headless linux build of Chimera from 05-13-2014. I have reinstalled chimera from the original .bin file, and I have also installed the most recent nightly headless build. Neither resolved the issue. I'm additionally confused because the exception is raised by tkgui.py, which by naming convention seems like it shouldn't even be called given that I am passing the "--nogui --silent --script" parameters to chimera.
> The specific call to chimera is this:
> chimera --nogui --silent --script 'lib/PDBMapVisualize.py 1hho 1 maf temp/61098856282.TEMP 1.000000 0.000000 data/rcsb/biounit/coordinates/all/1hho.pdb1.gz results/pdbmap_1kg_1hho_20140725-11 -'
> Where lib/PDBMapVisualize.py is my script and everything following are arguments to that script. Nothing about this call or the script it is calling have changed between when chimera ran successfully and now.
> Any help or advice in resolving this issue would be greatly appreciated. Thanks!
> Mike Sivley
> PhD Student in Biomedical Informatics
> Center for Human Genetics Research
> Vanderbilt University Medical Center
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
More information about the Chimera-users