<div dir="ltr"><div><div><div>Hi Tim,<br></div>thanks for the quick reply! I have just updated the pymol package and I can confirm that the bug is no longer there!<br></div><div>Do you think it might be worth to push this bug to upstream? from what I can understand googling the issue there seems to be almost nobody else experiencing it...let me know what you think, I can open the bugreport if you wish.<br></div>thanks again a lot,<br></div>Cheers,<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-27 15:39 GMT+02:00 Tim Booth <span dir="ltr"><<a href="mailto:tbooth@ceh.ac.uk" target="_blank">tbooth@ceh.ac.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Chiara,<br>
<br>
Confirmed this on my machine. This is a bad bug as it makes a whole<br>
chunk of Pymol functionality unavailable. As you say, it seems to be an<br>
issue with tkinter, but very specific to calling grid_info(), which is<br>
only used once in the Pymol code.<br>
<br>
Therefore, rather than attempt to debug tkinter (which is probably<br>
beyond me!) I've added a workaround patch. I've also upgraded the Pymol<br>
package from 1.7.0 to 1.7.2.1 while I was at it. The new package should<br>
appear in the software updater for you now.<br>
<br>
If you are interested, here is the patch:<br>
<br>
tbooth@balisaur$ cat 32_workaround_grid_info_bug.patch<br>
--- a/modules/pmg_tk/skins/normal/builder.py<br>
+++ b/modules/pmg_tk/skins/normal/builder.py<br>
<br>
def toggleChemProtein(self):<br>
- if self.chemFrame.grid_info():<br>
- self.chemB.configure(relief=RAISED)<br>
- self.chemFrame.grid_forget()<br>
- self.protB.configure(relief=SUNKEN)<br>
- self.protFrame.grid(row=1, column=2, rowspan=4, sticky=W)<br>
- else:<br>
- self.chemB.configure(relief=SUNKEN)<br>
- self.chemFrame.grid(row=1, column=2, rowspan=4, sticky=W)<br>
- self.protB.configure(relief=RAISED)<br>
- self.protFrame.grid_forget()<br>
+ #Nasty workaround for grid_info bug in Ubuntu 14.04.<br>
+ try:<br>
+ if self.chemFrame.grid_info(): raise TypeError()<br>
+ #If we get to here it means the chemFrame is not active<br>
+ self.protFrame.grid_forget()<br>
+ self.chemFrame.grid(row=1, column=2, rowspan=4, sticky=W)<br>
+ self.protB.configure(relief=RAISED)<br>
+ self.chemB.configure(relief=SUNKEN)<br>
+ except TypeError:<br>
+ self.chemFrame.grid_forget()<br>
+ self.protFrame.grid(row=1, column=2, rowspan=4, sticky=W)<br>
+ self.chemB.configure(relief=RAISED)<br>
+ self.protB.configure(relief=SUNKEN)<br>
<br>
############################################################<br>
<br>
Hopefully that sorts it.<br>
<br>
Cheers,<br>
<br>
TIM<br>
<div><div class="h5"><br>
On Wed, 2015-05-27 at 10:55 +0200, chiara cocconcelli wrote:<br>
> Hi all,<br>
><br>
> I'm using Biolinux 8 with pymol from the repositories but I am<br>
> encountering a tkinter-related bug. Steps to reproduce:<br>
><br>
><br>
> 1) open pymol<br>
><br>
> 2) in the list of buttons on the right click the Builder one<br>
><br>
> 3) in the panel that opens click Protein on the left<br>
><br>
><br>
> the function is not called and this error is raised:<br>
><br>
> Error: 1<br>
> <type 'exceptions.TypeError'> Exception in Tk callback<br>
> Function: <bound method Builder.toggleChemProtein of<br>
> <pmg_tk.skins.normal.builder.Builder instance at 0x7ffb82e56ea8>><br>
> (type: <type 'instancemethod'>)<br>
> Args: ()<br>
> Traceback (innermost last):<br>
> File "/usr/lib/python2.7/dist-packages/Pmw/Pmw_1_3/lib/PmwBase.py",<br>
> line 1747, in __call__<br>
> return apply(self.func, args)<br>
> File<br>
> "/usr/lib/python2.7/dist-packages/pmg_tk/skins/normal/builder.py",<br>
> line 1458, in toggleChemProtein<br>
> if self.chemFrame.grid_info():<br>
> File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2000, in grid_info<br>
> self.tk.call('grid', 'info', self._w))<br>
> <type 'exceptions.TypeError'>: coercing to Unicode: need string or<br>
> buffer, _tkinter.Tcl_Obj found<br>
><br>
><br>
> I can provide debugging on request and I have a bit of python<br>
> understanding, please let me know how I can best diagnose this problem<br>
><br>
> thanks in advance,<br>
><br>
> regards<br>
><br>
</div></div>> _______________________________________________<br>
> Bio-Linux mailing list<br>
> <a href="mailto:Bio-Linux@nebclists.nerc.ac.uk">Bio-Linux@nebclists.nerc.ac.uk</a><br>
> <a href="http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux" target="_blank">http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux</a><br>
<br>
--<br>
Tim Booth <<a href="mailto:tbooth@ceh.ac.uk">tbooth@ceh.ac.uk</a>><br>
NERC Environmental Bioinformatics Centre<br>
<br>
Centre for Ecology and Hydrology<br>
Maclean Bldg, Benson Lane<br>
Crowmarsh Gifford<br>
Wallingford, England<br>
OX10 8BB<br>
<br>
<a href="http://environmentalomics.org/bio-linux" target="_blank">http://environmentalomics.org/bio-linux</a><br>
<a href="tel:%2B44%201491%2069%202297" value="+441491692297">+44 1491 69 2297</a><br>
<br>
_______________________________________________<br>
Bio-Linux mailing list<br>
<a href="mailto:Bio-Linux@nebclists.nerc.ac.uk">Bio-Linux@nebclists.nerc.ac.uk</a><br>
<a href="http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux" target="_blank">http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux</a><br>
</blockquote></div><br></div>