Bug 1844800 - rtlsdr-scanner does not start due to various incompatibilities in matplotlib, wx
Summary: rtlsdr-scanner does not start due to various incompatibilities in matplotlib, wx
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: rtlsdr-scanner
Version: 34
Hardware: noarch
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-07 09:47 UTC by fedepell
Modified: 2022-06-07 22:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-07 22:23:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description fedepell 2020-06-07 09:47:57 UTC
Description of problem:
rtlsdr-scanner does not start at all on a Fedora 32 system.


Version-Release number of selected component (if applicable):
rtlsdr-scanner-1.3.2-6.fc32.noarch


How reproducible:
Always


Steps to Reproduce:
1. Install rtlsdr-scanner-1.3.2-6.fc32.noarch and automatic dependencies
2. Plug a compatible device to your system
3. Start 'rtlsdr_scan'

Actual results:
Does not start at all

Expected results:
Application starting


Additional info:

First problem seems an incompatibility with matplotlib, as starting will present:

>RTLSDR Scanner
>
>Detached kernel driver
>Found Rafael Micro R820T tuner
>[R82XX] PLL not locked!
>Reattached kernel driver
>Traceback (most recent call last):
>  File "/usr/bin/rtlsdr_scan", line 126, in <module>
>    frame = FrameMain(APP_NAME)
>  File "/usr/lib/python3.8/site-packages/rtlsdr_scanner/main_window.py", line 177, in __init__
>    self.__create_toolbars()
>  File "/usr/lib/python3.8/site-packages/rtlsdr_scanner/main_window.py", line 199, in __create_toolbars
>    self.graph = PanelGraph(self, self,
>  File "/usr/lib/python3.8/site-packages/rtlsdr_scanner/panels.py", line 99, in __init__
>    self.figure.set_size_inches(0, 0)
>  File "/usr/lib64/python3.8/site-packages/matplotlib/figure.py", line 902, in set_size_inches
>    raise ValueError(f'figure size must be positive finite not {size}')
>ValueError: figure size must be positive finite not [0 0]

Fixing by hand that value to ie. 1,1 will make us proceed to next error:

>RTLSDR Scanner
>
>Detached kernel driver
>Found Rafael Micro R820T tuner
>[R82XX] PLL not locked!
>Reattached kernel driver
>Traceback (most recent call last):
>  File "/usr/bin/rtlsdr_scan", line 126, in <module>
>    frame = FrameMain(APP_NAME)
>  File "/usr/lib/python3.8/site-packages/rtlsdr_scanner/main_window.py", line 177, in __init__
>    self.__create_toolbars()
>  File "/usr/lib/python3.8/site-packages/rtlsdr_scanner/main_window.py", line 199, in __create_toolbars
>    self.graph = PanelGraph(self, self,
>  File "/usr/lib/python3.8/site-packages/rtlsdr_scanner/panels.py", line 105, in __init__
>    self.toolbar = NavigationToolbar(self.canvas, self, settings,
>  File "/usr/lib/python3.8/site-packages/rtlsdr_scanner/toolbars.py", line 182, in __init__
>    self.pan()
>  File "/usr/lib64/python3.8/site-packages/matplotlib/backends/backend_wx.py", line 1353, in pan
>    NavigationToolbar2.pan(self, *args)
>  File "/usr/lib64/python3.8/site-packages/matplotlib/backend_bases.py", line 2855, in pan
>    self.set_message(self.mode)
>  File "/usr/lib64/python3.8/site-packages/matplotlib/backends/backend_wx.py", line 1505, in set_message
>    status_bar.set_function(s)
>AttributeError: 'Statusbar' object has no attribute 'set_function'

Looks related again to Matplotlib changes: https://github.com/matplotlib/matplotlib/issues/17085

Hand patching the removal of statusbar (as per issue linked) would then make me able to use the package.

TLDR: probably the dependency matplotlib 3.2.1 is the real culprit and may break other applications as well with the change.

Comment 1 Fedora Program Management 2021-04-29 16:48:25 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 fedepell 2021-05-01 05:20:55 UTC
rtlsdr-scanner package seems still broken also on FC34, although now the errors (at least the first printed that stops further execution) are different, see also Bug #1901488.

Sincerely, given that the package seems totally unmaintained (last commit being August 2018), I'm not sure how much can be done on this and if Fedora should even be distributing this broken package.

Note: even the "URL" given in the RPM (http://eartoearoak.com/software/rtlsdr-scanner) currently gives an "account suspended" message

Comment 3 Jaroslav Škarvada 2021-05-03 08:18:29 UTC
Thanks for the report. I don't know what happened with the upstream, but hopefully somebody will fork it. Could you provide patches? It shouldn't be hard to fix. I will take a look later, unfortunately I am on the more prio projects at the moment. Also co-maintenance is welcome.

Comment 4 fedepell 2021-05-03 10:00:19 UTC
Thanks Jaroslav for the feedback!

I will try to give a look and come with a patch! As I was trying for a fix I found one of the imported modules (python3-visvis) has also a bug with Python 3.9 and opened Bug #1956244, which is now somehow a stopper also to this one.

I will try write later on on changes to this specific package!

Comment 5 fedepell 2021-05-03 10:26:18 UTC
Just as a reference:

https://github.com/matplotlib/matplotlib/blob/a8831d57207db5e9bf681e30810ce0ea146f4a31/doc/api/prev_api_changes/api_changes_3.3.0/removals.rst

Specifically the removals that break the rtlsdr-scanner are:
- dates.seconds() (no replacement)
- colorbar.ColorbarBase.set_cmap (use ScalarMappable.set_cmap instead)


For the first one I believe trivially changing the seconds(1) to (1/(60*60*24)) should do it (plus of course removing the import)

For the second one I'm having troubles understanding how to remap to this new object hierarchy. (so just commenting it out will make the application go, but without custom colormaps).

Comment 6 Stephen J Alexander 2021-12-03 11:13:57 UTC
Problems persist in FC35.
Using the FC35 matplotlib rpm package gives:

$ rtlsdr_scan 
Traceback (most recent call last):
  File "/bin/rtlsdr_scan", line 48, in <module>
    from rtlsdr_scanner.cli import Cli
  File "/usr/lib/python3.10/site-packages/rtlsdr_scanner/cli.py", line 38, in <module>
    from rtlsdr_scanner.file import save_plot, export_plot, ScanInfo, File
  File "/usr/lib/python3.10/site-packages/rtlsdr_scanner/file.py", line 46, in <module>
    from rtlsdr_scanner.spectrum import create_mesh, sort_spectrum
  File "/usr/lib/python3.10/site-packages/rtlsdr_scanner/spectrum.py", line 29, in <module>
    from matplotlib.dates import seconds
ImportError: cannot import name 'seconds' from 'matplotlib.dates' (/usr/lib64/python3.10/site-packages/matplotlib/dates.py)

After :
pip install matplotlib==3.2.1
...
Successfully installed matplotlib-3.2.1
$ rtlsdr_scan 
...
>ValueError: figure size must be positive finite not [0 0]
as above.

Comment 7 Ben Cotton 2022-05-12 15:34:30 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 8 Ben Cotton 2022-06-07 22:23:16 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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