Bug 2023479 - fsleyes doesn't display images on Fedora 35
Summary: fsleyes doesn't display images on Fedora 35
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-fsleyes
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-15 20:32 UTC by CFS
Modified: 2022-02-02 01:24 UTC (History)
2 users (show)

Fixed In Version: python-fsleyes-1.3.3-3.fc34 python-fsleyes-1.3.3-3.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-24 12:50:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Errors that I get running fsleyes (241.93 KB, text/plain)
2021-11-15 20:52 UTC, CFS
no flags Details

Description CFS 2021-11-15 20:32:47 UTC
Description of problem: fsleyes doesn't display images


Version-Release number of selected component (if applicable):


How reproducible: Always


Steps to Reproduce:
1. Open Nifti image on fsleyes
2.
3.

Actual results: Screen stays black


Expected results: Image displayed

Comment 1 CFS 2021-11-15 20:52:08 UTC
Created attachment 1841891 [details]
Errors that I get running fsleyes

Comment 2 CFS 2021-11-16 00:55:10 UTC
I could fix this by downgrading to matplotlib 3.4.3, which is the stable version. Fedora 35 has 3.5.0rc1.

Comment 3 CFS 2021-11-16 01:11:12 UTC
I also changed line 305 of `/usr/lib64/python3.10/site-packages/wx/lib/stattext.py` to `x = (width - w)//2` and now it seems like fsleyes works again.

Comment 4 Ankur Sinha (FranciscoD) 2021-11-18 11:41:53 UTC
Thanks for the bug report. Are you on X11 or Wayland? I think we're still waiting for a wxpython update for Wayland:

https://github.com/pauldmccarthy/fsleyes/issues/22


Generally, this looks like two issues. I'll file the first with fsleyes upstream now, and then we'll file another one for wxpython

I get this when I run it:

```
TypeError: DC.DrawText(): arguments did not match any overloaded call:
  overload 1: argument 2 has unexpected type 'float'         
  overload 2: argument 2 has unexpected type 'float'                                                                                    
Traceback (most recent call last): 
  File "/usr/lib64/python3.10/site-packages/wx/lib/stattext.py", line 306, in OnPaint
    dc.DrawText(line, x, y)            
```

Cheers,

Comment 5 Ankur Sinha (FranciscoD) 2021-11-18 11:42:31 UTC
Would you have a test file that we could submit to upstream to reproduce the error by any chance?

Comment 6 CFS 2021-11-18 12:14:07 UTC
(In reply to Ankur Sinha (FranciscoD) from comment #4)
> Thanks for the bug report. Are you on X11 or Wayland? I think we're still
> waiting for a wxpython update for Wayland:
> 
> https://github.com/pauldmccarthy/fsleyes/issues/22
> 
> 
> Generally, this looks like two issues. I'll file the first with fsleyes
> upstream now, and then we'll file another one for wxpython
> 
> I get this when I run it:
> 
> ```
> TypeError: DC.DrawText(): arguments did not match any overloaded call:
>   overload 1: argument 2 has unexpected type 'float'         
>   overload 2: argument 2 has unexpected type 'float'                        
> 
> Traceback (most recent call last): 
>   File "/usr/lib64/python3.10/site-packages/wx/lib/stattext.py", line 306,
> in OnPaint
>     dc.DrawText(line, x, y)            
> ```
> 
> Cheers,

I have tried it both on X11 and Wayland with the same results. I'm not sure what test file to submit, because I couldn't open any Nifti files whatsoever. For example, one of the FSL templates. But I've fixed this problem by downgrading matplotlib to 3.4.3, which is the stable version, because Fedora 35 has 3.5.0rc1 and the fsleyes script parses the version number incorrectly (it tries to convert "0rc1" into a number and fails. Second, I've fixed the error you mentioned by changing wxPython's code as I mentioned above on comment 3 (and BTW I submitted a pull request with this change to wxPython's Github repo). I did NOT get the same error as the Github issue you mentioned. By doing these two things that I mentioned, I could now open Nifti files on Wayland and got no errors on the terminal, but the interface didn't look totally right to me. For the moment, I've installed fsleyes on miniconda, just to be sure.

Comment 7 Fedora Update System 2022-01-24 12:07:15 UTC
FEDORA-2022-abf5c05534 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-abf5c05534

Comment 8 Ankur Sinha (FranciscoD) 2022-01-24 12:10:07 UTC
Could you try the update please? It seems to work fine here now for me here on Wayland (I tested with the nifti images in the fsleyes sources).

Matplotlib has now been updated to 3.5.1 in Fedora 35 too, so you should stop seeing the warnings/errors on your terminal also.

These are the package versions I have:

$ rpm -qa \*matplotlib\* \*fsl\* \*wx\*
wxGTK3-i18n-3.0.5.1-5.fc35.noarch
wxBase3-3.0.5.1-5.fc35.x86_64
python3-matplotlib-inline-0.1.2-3.fc35.noarch
wxGTK3-3.0.5.1-5.fc35.x86_64
wxGTK3-gl-3.0.5.1-5.fc35.x86_64
python3-fsleyes-props-1.7.3-1.fc35.noarch
python3-fsleyes-widgets-0.12.2-1.fc35.noarch
python3-wxnatpy-0.4.0-1.fc35.noarch
python3-matplotlib-data-fonts-3.5.1-3.fc35.noarch
python3-matplotlib-data-3.5.1-3.fc35.noarch
python3-wxpython4-4.0.7-24.fc35.x86_64
python3-matplotlib-3.5.1-3.fc35.x86_64
python3-matplotlib-tk-3.5.1-3.fc35.x86_64
python3-matplotlib-qt5-3.5.1-3.fc35.x86_64
python3-matplotlib-wx-3.5.1-3.fc35.x86_64
python3-matplotlib-scalebar-0.8.0-2.fc35.noarch
python3-fslpy-3.8.1-3.fc35.noarch
python3-fsleyes-1.3.3-3.fc35.noarch

Comment 9 CFS 2022-01-24 12:50:01 UTC
It works fine, thank you.

Comment 10 Fedora Update System 2022-01-25 01:21:09 UTC
FEDORA-2022-3de8ac2a94 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-3de8ac2a94`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-3de8ac2a94

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2022-01-25 02:10:17 UTC
FEDORA-2022-abf5c05534 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-abf5c05534`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-abf5c05534

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2022-02-02 01:14:50 UTC
FEDORA-2022-3de8ac2a94 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2022-02-02 01:24:46 UTC
FEDORA-2022-abf5c05534 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.