gnumed-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <bug>: <user did not comment on bug report>


From: Karsten Hilbert
Subject: Re: <bug>: <user did not comment on bug report>
Date: Mon, 12 Sep 2022 22:04:02 +0200

Hello Henrique,

thanks for taking the time to report this issue.

> client version: 1.8.7

This problem you are seeing:

> Exception:
>
>  type: <class 'AttributeError'>
>  value: 'NoneType' object has no attribute 'GetWidth'
>
> Traceback:
>
>   File "/usr/lib/python3/dist-packages/wx/lib/statbmp.py", line 136, in 
> DoGetBestSize
>     return wx.Size(self._bitmap.GetWidth(), self._bitmap.GetHeight())

stems from the fact that

> Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] on linux (posix)

started to become picky about not passing floats to integer functions:

> Traceback (most recent call last):
>   File "/usr/share/gnumed/Gnumed/wxpython/gmGuiHelpers.py", line 429, in 
> file2scaled_image
>     img_data.Rescale(rescaled_width, rescaled_height, quality = 
> wx.IMAGE_QUALITY_HIGH)                # w, h
> TypeError: Image.Rescale(): argument 1 has unexpected type 'float'

which results in an image not being loaded

> 2022-09-08 00:26:53  ERROR     gm.main       [139781502234624 MainThread]  
> (/usr/share/gnumed/Gnumed/wxpython/gmGuiHelpers.py::file2scaled_image() 
> #433): cannot load image from 
> [/tmp/gnumed-henrique/g-oobbj8zn/gm-person_tag-swq0ovat.png]

and GNUmed not checking whether it has an image or not which
in turn makes wx fail to rescale that non-image:

> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/wx/lib/statbmp.py", line 136, in 
> DoGetBestSize
>     return wx.Size(self._bitmap.GetWidth(), self._bitmap.GetHeight())
> AttributeError: 'NoneType' object has no attribute 'GetWidth'

I have fixed that problem for the next release.

GNUmed will run fine with Python 3.9 so you may want to try
that out.

Thanks,
Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



reply via email to

[Prev in Thread] Current Thread [Next in Thread]