Opened 2 years ago

Last modified 2 years ago

#65595 reopened defect

gnuradio: TypeError: Argument 0 does not allow None as a value

Reported by: adamgao1996 Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ra1nb0w
Port: gnuradio

Description (last modified by ryandesign (Ryan Carsten Schmidt))

M1max macbook pro

yixuan@Yixuans-MacBook-Pro uhd % uhd_find_devices 
[INFO] [UHD] Mac OS; Clang version 13.1.6 (clang-1316.0.21.2.5); Boost_107900; UHD_4.2.0.HEAD-0-g321295fb
No UHD Devices Found
yixuan@Yixuans-MacBook-Pro uhd % gnuradio-companion 
Gtk init_check failed. GRC might not be able to start a GUI.
Traceback (most recent call last):
  File "/opt/local/bin/gnuradio-companion", line 112, in <module>
    run_main()
  File "/opt/local/bin/gnuradio-companion", line 105, in run_main
    sys.exit(main())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/main.py", line 73, in main
    from .gui.Platform import Platform
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/gui/Platform.py", line 26, in <module>
    from . import canvas
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/gui/canvas/__init__.py", line 21, in <module>
    from .param import Param
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/gui/canvas/param.py", line 23, in <module>
    from .. import ParamWidgets, Utils, Constants, Actions
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/gui/ParamWidgets.py", line 69, in <module>
    add_style_provider()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/gui/ParamWidgets.py", line 64, in add_style_provider
    Gtk.StyleContext.add_provider_for_screen(
TypeError: Argument 0 does not allow None as a value

Change History (7)

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ra1nb0w added
Description: modified (diff)
Owner: set to michaelld
Status: newassigned
Summary: can not open guignuradio: TypeError: Argument 0 does not allow None as a value

comment:2 Changed 2 years ago by michaelld (Michael Dickens)

Looking at the UHD [INFO] line: This UHD is not provided by MacPorts, whereas gnuradio-companion is clearly in the MacPorts default install directory. We do not support this mix-and-match of package managers / from source outside MacPorts. We do our best to make sure MacPorts-installed packages use each other and not those outside MacPorts, with very few exceptions & those are documented. This is not one of the exceptions. Thus, strongly recommend that you: (1) uninstall both GNU Radio and UHD from MacPorts; (2) remove the non-MacPorts UHD (and other related packages, e.g., GNU Radio, if installed that way); then (3) have port install UHD and GNU Radio again.

comment:3 Changed 2 years ago by michaelld (Michael Dickens)

Resolution: worksforme
Status: assignedclosed

I'm going to close this ticket as "worksforme" since it does & I'm pretty confident that what I note is the issue, based on the info in this ticket as well as your ticket UHD ticket where you note the Brew UHD install. If this turns out to not be the case, then reopen & provide information that shows otherwise.

comment:4 Changed 2 years ago by adamgao1996

uninstalled brew fully, and reinstalled both packages, the error still occurs.

yixuan@Yixuans-MacBook-Pro ~ % port installed name:uhd and active The following ports are currently installed:

uhd @3.15.0.0_6+docs+examples+libusb+manpages+manual+python310+python_api+test (active)

yixuan@Yixuans-MacBook-Pro ~ % port installed name:gnuradio and active The following ports are currently installed:

gnuradio @3.8.5.0_1+docs+grc+python39+qtgui+sdl+uhd+wavelet+zeromq (active)

yixuan@Yixuans-MacBook-Pro ~ % gnuradio-companion Gtk init_check failed. GRC might not be able to start a GUI. No such schema “org.gnome.desktop.interface” Traceback (most recent call last):

File "/opt/local/bin/gnuradio-companion", line 112, in <module>

run_main()

File "/opt/local/bin/gnuradio-companion", line 105, in run_main

sys.exit(main())

File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/main.py", line 73, in main

from .gui.Platform import Platform

File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/gui/Platform.py", line 26, in <module>

from . import canvas

File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/gui/canvas/init.py", line 21, in <module>

from .param import Param

File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/gui/canvas/param.py", line 23, in <module>

from .. import ParamWidgets, Utils, Constants, Actions

File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/gui/ParamWidgets.py", line 69, in <module>

add_style_provider()

File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gnuradio/grc/gui/ParamWidgets.py", line 64, in add_style_provider

Gtk.StyleContext.add_provider_for_screen(

TypeError: Argument 0 does not allow None as a value

I've tried the suggestion here https://github.com/gnuradio/gnuradio/issues/3893 sudo port install gnuradio -x11 +no_x11 +quartz but got another error message

yixuan@Yixuans-MacBook-Pro ~ % sudo port install gnuradio -x11 +no_x11 +quartz ---> Computing dependencies for gnuradio ---> Fetching archive for gnuradio ---> Attempting to fetch gnuradio-3.8.5.0_1+docs+grc+python39+qtgui+quartz+sdl+uhd+wavelet+zeromq.darwin_21.arm64.tbz2 from https://packages.macports.org/gnuradio ---> Attempting to fetch gnuradio-3.8.5.0_1+docs+grc+python39+qtgui+quartz+sdl+uhd+wavelet+zeromq.darwin_21.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/gnuradio ---> Attempting to fetch gnuradio-3.8.5.0_1+docs+grc+python39+qtgui+quartz+sdl+uhd+wavelet+zeromq.darwin_21.arm64.tbz2 from https://mse.uk.packages.macports.org/gnuradio ---> Fetching distfiles for gnuradio ---> Verifying checksums for gnuradio ---> Extracting gnuradio ---> Applying patches to gnuradio ---> Configuring gnuradio Error: Failed to configure gnuradio: gtk3 must be installed with +quartz. Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gnuradio/gnuradio/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port gnuradio failed

comment:5 Changed 2 years ago by adamgao1996

Resolution: worksforme
Status: closedreopened

comment:6 Changed 2 years ago by michaelld (Michael Dickens)

OK a few thoughts:

1) you'll want to make sure the +pythonX variants are the same; they are not for the noted uhd and gnuradio from your prior entry. We're slowly working through ports to move them to +python310 where possible; there is currently a mismatch between UHD and GNU Radio that will be resolved soon. In the meantime, you can set default variants in /opt/local/etc/macports/variants.conf file. For example mine shows:

-x11 +no_x11 +quartz
+python310
+openblas

You might choose otherwise, of course. Having whatever variants you pick noted in this file will enforce using them for new installs for packages that support those variants.

2) In order to change variants for a specific package, dependency packages sometimes need those variants too. This is the case for your -x11 +no_x11 +quartz ... gtk3 needs to also be installed with those variants (and some others will too, but port errors out at the first one I believe). Unfortunately I don't think port can be told to "enforce variants" with install ... just with upgrade. Thus you'll probably have to go through and manually uninstall then install packages such as gtk3 to get the variants correct -- preferably after setting the default variants you want as noted in (1).

3) An option to get (1) and (2) correct is to totally uninstall all packages (sudo port -f uninstall $(port installed)), then do (1), then try sudo port install gnuradio and hope for the best ... this will take some time since most packages will be built from source. This option is actually a good idea since you clearly had Brew installed at the same time as MacPorts and -- while we try our best to keep dependency detection and use within each's domain, to not cross-use dependencies -- this does sometimes happen. Uninstalling both & then using just 1 package manager is highly recommended.

comment:7 Changed 2 years ago by adamgao1996

thanks. Will try and reply here when finish

Note: See TracTickets for help on using tickets.