peterazmanov / enaml

[Python 3.4] Declarative User Interfaces for Python fork (separate branch for Qt5)
Other
5 stars 2 forks source link

examples/layout/advanced/override_layout_constraints.enaml example doesn't work #16

Closed rutsky closed 8 years ago

rutsky commented 8 years ago
$ enaml-run examples/layout/advanced/override_layout_constraints.enaml 
Traceback (most recent call last):
  File "/home/bob/work/modernization/protoacs/env/bin/enaml-run", line 9, in <module>
    load_entry_point('enaml==0.9.8', 'console_scripts', 'enaml-run')()
  File "/home/bob/work/modernization/protoacs/enaml/enaml/runner.py", line 65, in main
    window.show()
  File "/home/bob/work/modernization/protoacs/enaml/enaml/widgets/window.py", line 416, in show
    self.activate_proxy()
  File "/home/bob/work/modernization/protoacs/enaml/enaml/widgets/toolkit_object.py", line 213, in activate_proxy
    child.activate_proxy()
  File "/home/bob/work/modernization/protoacs/enaml/enaml/widgets/toolkit_object.py", line 214, in activate_proxy
    self.activate_bottom_up()
  File "/home/bob/work/modernization/protoacs/enaml/enaml/widgets/toolkit_object.py", line 236, in activate_bottom_up
    self.proxy.activate_bottom_up()
  File "/home/bob/work/modernization/protoacs/enaml/enaml/qt/qt_toolkit_object.py", line 82, in activate_bottom_up
    self.init_layout()
  File "/home/bob/work/modernization/protoacs/enaml/enaml/qt/qt_container.py", line 334, in init_layout
    self._setup_manager()
  File "/home/bob/work/modernization/protoacs/enaml/enaml/qt/qt_container.py", line 528, in _setup_manager
    manager.set_items(self._create_layout_items())
  File "/home/bob/work/modernization/protoacs/enaml/enaml/layout/layout_manager.py", line 311, in set_items
    lc = root.layout_constraints()
  File "/home/bob/work/modernization/protoacs/enaml/enaml/layout/layout_manager.py", line 131, in layout_constraints
    return expand_constraints(self.constrainable(), self.constraints())
  File "/home/bob/work/modernization/protoacs/enaml/enaml/layout/layout_helpers.py", line 154, in expand_constraints
    cns.extend(cn.create_constraints(component))
  File "/home/bob/work/modernization/protoacs/enaml/enaml/layout/constraint_helper.py", line 71, in create_constraints
    cns = self.constraints(component)
  File "/home/bob/work/modernization/protoacs/enaml/enaml/layout/grid_helper.py", line 235, in constraints
    row_spacer = FlexSpacer(self.row_spacing / 2)  # floor division
  File "/home/bob/work/modernization/protoacs/enaml/enaml/layout/spacers.py", line 181, in __init__
    self.size = size
TypeError: The 'size' member on the 'FlexSpacer' object must be of type 'int'. Got object of type 'float' instead.
$
rutsky commented 8 years ago

Same error with examples:

  1. examples/layout/advanced/factory_func.enaml,
  2. examples/layout/basic/grid.enaml.