<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>44827</bug_id>
          
          <creation_ts>2023-01-06 21:03:47 +0300</creation_ts>
          <short_desc>TypeError: Rect.SetHeight(): argument 1 has unexpected type &apos;float&apos;</short_desc>
          <delta_ts>2023-01-14 15:46:42 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>python3-module-wx</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anton Zhukharev">ancieg</reporter>
          <assigned_to name="Fr. Br. George">george</assigned_to>
          <cc>george</cc>
    
    <cc>grenka</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>219740</commentid>
    <comment_count>0</comment_count>
    <who name="Anton Zhukharev">ancieg</who>
    <bug_when>2023-01-06 21:03:47 +0300</bug_when>
    <thetext>Ошибка внутри модуля wx.lib.agw.aui.

Выглядит следующим образом:
--------------------------------------------------------------------------------
Python 3.10.8 (main, Dec 17 2022, 11:34:59) [GCC 12.1.1 20220518 (ALT Sisyphus 12.1.1-alt2)] on linux
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; import wx, wx.lib.agw.aui as aui
20:57:41: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1016,wx containers,compatible with 2.6,compatible with 2.8),
and wxPython used 3.0 (wchar_t,compiler with C++ ABI 1017,wx containers,compatible with 2.6,compatible with 2.8).
&gt;&gt;&gt; app = wx.App()
&gt;&gt;&gt; wnd = wx.Frame(None)
&gt;&gt;&gt; panel = wx.Panel(wnd)
&gt;&gt;&gt; notebook = aui.AuiNotebook(panel)
&gt;&gt;&gt; notebook.AddPage(wx.Panel(wnd), &quot;Test&quot;)
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/auibook.py&quot;, line 3575, in AddPage
    return self.InsertPage(self.GetPageCount(), page, caption, select, bitmap, disabled_bitmap, control, tooltip)
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/auibook.py&quot;, line 3653, in InsertPage
    self.SetSelectionToWindow(page)
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/auibook.py&quot;, line 4410, in SetSelectionToWindow
    self.SetSelection(idx)
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/auibook.py&quot;, line 4357, in SetSelection
    ctrl.MakeTabVisible(ctrl_idx, ctrl)
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/auibook.py&quot;, line 1843, in MakeTabVisible
    if not self.IsTabVisible(tabPage, self.GetTabOffset(), dc, win):
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/auibook.py&quot;, line 1732, in IsTabVisible
    self.Render(dc, wnd)
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/auibook.py&quot;, line 1687, in Render
    page.rect, tab_button.rect, x_extent = self._art.DrawTab(dc, wnd, page, rect, tab_button.cur_state)
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/tabart.py&quot;, line 475, in DrawTab
    r.SetHeight(r.GetHeight()/2)
TypeError: Rect.SetHeight(): argument 1 has unexpected type &apos;float&apos;
--------------------------------------------------------------------------------

Сущностям модуля ни одного числа не было передано, однако он упал из-за неожиданного значения типа float.

Если потом запустить главный цикл событий, то ошибка будет сыпаться постоянно при изменении размеров окна и в нём ничего отображаться не будет:
--------------------------------------------------------------------------------
app.MainLoop()
Traceback (most recent call last):
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/auibook.py&quot;, line 2006, in OnPaint
    self.Render(dc, self)
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/auibook.py&quot;, line 1687, in Render
    page.rect, tab_button.rect, x_extent = self._art.DrawTab(dc, wnd, page, rect, tab_button.cur_state)
  File &quot;/usr/lib64/python3/site-packages/wx/lib/agw/aui/tabart.py&quot;, line 475, in DrawTab
    r.SetHeight(r.GetHeight()/2)
TypeError: Rect.SetHeight(): argument 1 has unexpected type &apos;float&apos;
--------------------------------------------------------------------------------

Огромная просьба починить (возможно поможет обновление до пакета до текущей версии в апстриме - 4.2.0).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>220138</commentid>
    <comment_count>1</comment_count>
    <who name="Grigory Ustinov">grenka</who>
    <bug_when>2023-01-14 15:46:42 +0300</bug_when>
    <thetext>+* Sat Jan 14 2023 Grigory Ustinov &lt;grenka@altlinux.org&gt; 4.2.0-alt1
+- Build new version (Closes: #44826 and #44827).

Вот так автозакрывать баги не надо.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>