Thanks Jose, looking forward to the new CMview version!

There is a workaround to get current CMview and latest PyMOL to work together: 
Create a pymolrc file with the following content:

from pymol import cmd
__import__('sys').modules['cmd'] = cmd

FYI: In PyMOL 1.7.3 we changed the pymol namespace to do absolute imports only 
(https://www.python.org/dev/peps/pep-0328/) to avoid import conflicts with 
global modules. Since PyMOL's "run" command executes scripts in the "pymol" 
module namespace by default, it was actually possible to do relative imports of 
pymol submodules ("import cmd" instead of "from pymol import cmd").

Cheers,
  Thomas

On 19 Jun 2015, at 04:53, Jose Manuel Duarte <jose.dua...@psi.ch> wrote:

> Hi Chiranjeev
> 
> It looks like this is an issue in CMview, not in PyMOL. The script used to 
> interact with PyMOL contains an incompatible import on PyMOL versions 1.7.3+. 
> Thanks to Thomas Holder this is now fixed in github. 
> 
> In the next weeks we are going to try to get out a new release of CMview that 
> contains the patch. In the meantime you can try using an older PyMOL version, 
> e.g. 1.7.2 (I've just tested it and it worked for me).
> 
> Cheers
> 
> Jose
> 
> 
> 
> On 17.06.2015 11:38, Chiranjeev Das wrote:
>> The problem appears while using MacPyMol with CMView 1.1.1
>> 
>> log:
>> 
>> Detected OpenGL version 2.0 or greater. Shaders available.
>>  Detected GLSL version 1.20.
>> PyMOL>log_open 
>> /var/folders/j2/rc5hm8nx37vb6c2w1b6341dc0000gn/T/cmview_internal_pymol.log
>> PyMOL>@/var/folders/j2/rc5hm8nx37vb6c2w1b6341dc0000gn/T/CMView_pymol.cmd
>> PyMOL>run /var/folders/j2/rc5hm8nx37vb6c2w1b6341dc0000gn/T/cmview.py
>> Traceback (most recent call last):
>>   File "/Applications/MacPyMOL.app/Contents/pymol/modules/pymol/parser.py", 
>> line 256, in parse
>>     self.result=apply(layer.kw[0],layer.args,layer.kw_args)
>>   File "/Applications/MacPyMOL.app/Contents/pymol/modules/pymol/parsing.py", 
>> line 485, in run
>>     run_(path, ns_pymol, ns_pymol)
>>   File "/Applications/MacPyMOL.app/Contents/pymol/modules/pymol/parsing.py", 
>> line 535, in run_file
>>     execfile(file,global_ns,local_ns)
>>   File "/Applications/MacPyMOL.app/Contents/pymol/modules/pymol/parsing.py", 
>> line 530, in execfile
>>     b.execfile(filename, global_ns, local_ns)
>>   File "/var/folders/j2/rc5hm8nx37vb6c2w1b6341dc0000gn/T/cmview.py", line 
>> 11, in <module>
>>     from cmd import lock,unlock,_cmd # for dist counter
>> ImportError: cannot import name lock
>> PyMOL>set dash_gap, 0
>>  Setting: dash_gap set to 0.00000.
>> PyMOL>set dash_width, 1.5
>>  Setting: dash_width set to 1.50000.
>> PyMOL>viewport 650, 650
>> PyMOL>callback 
>> /var/folders/j2/rc5hm8nx37vb6c2w1b6341dc0000gn/T/cmview.callback, 1
>> Traceback (most recent call last):
>>   File "/Applications/MacPyMOL.app/Contents/pymol/modules/pymol/parser.py", 
>> line 419, in parse
>>     exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
>>   File "<string>", line 1, in <module>
>> NameError: name 'callback' is not defined
>> 
>> All and any help is appreciated.
>> 
>> Brgds, 
>> Chiranjeev Das

-- 
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.


------------------------------------------------------------------------------
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to