View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014999VTK(No Category)public2014-09-17 15:132014-10-06 11:32
ReporterJens Thomas 
Assigned ToDavid Gobbi 
PriorityhighSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version5.8.1 
Target VersionFixed in Version6.2.0 
Summary0014999: Bug in vtkLoadPythonTkWidgets.py with Tk 8.6
DescriptionThe following script:

import Tkinter
import vtk.tk.vtkTkRenderWidget

# create root window
root = Tkinter.Tk()

# Create 2 panes
pane1=vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root)
pane2=vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root)

Fails with:

Traceback (most recent call last):
  File "test.py", line 9, in <module>
    pane2=vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root)
  File "/usr/lib/pymodules/python2.7/vtk/tk/vtkTkRenderWidget.py", line 81, in __init__
    vtkLoadPythonTkWidgets(master.tk)
  File "/usr/lib/pymodules/python2.7/vtk/tk/vtkLoadPythonTkWidgets.py", line 15, in vtkLoadPythonTkWidgets
    if string.find(loaded, pkgname) >= 0:
  File "/usr/lib/python2.7/string.py", line 361, in find
    return s.find(*args)
AttributeError: 'tuple' object has no attribute 'find'

I think this is because the interface of the Tk function loaded has changed, and now returns a tuple, whereas previously it returned a string:

http://wiki.tcl.tk/9820 [^]

This is on the following system:

Python 2.7.6
Ubuntu 14.04.1 LTS
Tkinter: __version__ = "$Revision: 81008 $"
Tk: 8.6.0+6ubuntu3
VTK: 5.8.0
TagsNo tags attached.
ProjectTBD
Typecrash
Attached Files

 Relationships

  Notes
(0033590)
David Gobbi (developer)
2014-10-06 02:19

Bug confirmed. Confusingly, it only occurs if other tcl packages were loaded by Tkinter before the vtkTkRenderWidget.

http://review.source.kitware.com/#/c/17526/1 [^]
(0033601)
David Gobbi (developer)
2014-10-06 11:32

author: David Gobbi <david.gobbi@gmail.com>
date: Mon, 6 Oct 2014 12:46:47 +0000 (06:46 -0600)
commit: cc5740c87dab6b2c1fb86bf95c96aa78ba9c07a5
14999: Python Tk widgets fail to load on Tcl 8.6.

 Issue History
Date Modified Username Field Change
2014-09-17 15:13 Jens Thomas New Issue
2014-10-02 11:23 Berk Geveci Assigned To => Berk Geveci
2014-10-06 02:19 David Gobbi Note Added: 0033590
2014-10-06 02:19 David Gobbi Assigned To Berk Geveci => David Gobbi
2014-10-06 02:19 David Gobbi Status backlog => gerrit review
2014-10-06 11:32 David Gobbi Note Added: 0033601
2014-10-06 11:32 David Gobbi Status gerrit review => closed
2014-10-06 11:32 David Gobbi Resolution open => fixed
2014-10-06 11:32 David Gobbi Fixed in Version => 6.2.0


Copyright © 2000 - 2018 MantisBT Team