Closed K0HYD closed 1 year ago
If it's looking for gtk in /org/gtk there might be problem with how you have Python 3 and/or PyGObject configured (unless there's something about Monterrey that I don't know about).
Make sure your're using Python 3 and that it's version 3.9. Also make sure you're using the PyGObject that's meant for Python 3. I believe the latest versions of Python3 and PyGObject are 3.9.7 and 3.42.0, respectively.
All of this may depend upon which package manager you're using to install these things. If you're not using one, I recommend you use Homebrew for both those packages ("brew install python@3.9" and "brew install pygobject3"). If you've installed Python3 separately and used pacman to install PyGObject, I'm not really sure what it gives you.
Lastly, it could be an issue with the GTK (and GDK) that PyGObject is finding. I believe it needs Gtk3: Gtk+3 (v3.24.30) and maybe Glib (v2.27.0) and GDK Pixbuf (v2.42.6). You could use Homebrew to install those as well ("brew install gtk+3", "brew install glib", and "brew install gdk-pixbuf"). That said, I think I might need to add those to the README as I may have taken those for granted.
Hello Mark!
Thank you for the quick response for my please for help.
I went through your email and checked everything. In fact, I reinstalled all of the package you mentioned using Homebrew. That is how I installed them initially.
I also went through the steps in the PyGObject and Pillow “readthedocs.io” listed in your readme instructions.
I also ran the “Hello World” example they provide and it runs fine.
All of the version numbers agree with your email. I have Python3 3.9.7_1 and PyGObject 3.42.0_1. I have Gtk+3 installed and is is version 3.24.30. The Glib installed is version 2.70.0_1. and the GDK Pixbuf installed is version 2.42.6. I did the reinstall with Homebrew for Gtk+3 Glib and GDK Pibuf. The Pillow I have installed in 8.3.2_1.
I ran nrsc5-dui.py again and got this:
(nrsc5-dui.py:5449): Gtk-WARNING **: 01:34:21.585: Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg. This may indicate that pixbuf loaders or the mime database could not be found.
I did a search in /usr/local for check-symbolic.svg and did not find any.
When I run the program I get a window with a title bar that reads NRSC5-DUI. It that the three buttons: close, collapse and full screen toggle on the left end of the title bar like all Mac programs. I am in dark mode now as it is late at night so the window itself is solid black. As a test I switched to light mode and the title bar changed to White with Black letters but the window itself remained black.
I’m new to Python so I’m presently lost.
I can run any test and capture any logs you need to pursue this. Again I build nrsc5 itself and it runs great. I can decode every HD station in the area. I also have been able to build SDR++ and run it successfully.
Thanks for any help you can provide.
73 de Dale - K0HYD Goddard, KS 67052
I don't have a check-symbolic.svg, nor is the Python code explicitly looking for it.
So there's a GDK configuration issue somewhere.
The reason why the screen is empty is because it's failing when trying to build the screen.
Maybe try running it using the Python3 debugger:
python3 -m pdb nrsc5-dui.py
Another thought: Are you running an Intel or an ARM (M1 or M1x) Mac ? It's possible that Homebrew has configured these packages differently for ARM Macs?
Hello Mark!
Thanks for your earlier help. I did try the debugger and had a little bit of luck. The main issue I believe is the line:
from PIL import Image, ImageFont, ImageDraw
The program reports that there is no module PIL. I searched and searched but cannot find how to install it. I did install pillow with homebrew.
Tonight I uninstalled every module you listed in you email of October 14. I then reinstalled them all using homebrew. I'm still getting the same error.
I've searched for PIL and am coming up empty. A few answers recommended "pillow" so I did install it also. I tried substituting "pillow" for PIL in the line above but that did not work.
I'm dead in the water again at this point.
I hope there is a solution somewhere out there.
Thanks Mark!
73 de dale - K0HYD
PIL is Pillow (capital P). You don't want to use Homebrew to manage that, or any of the other Python dependencies because you don't know what version of Python it will install for. You want to use Python 3's own installation manager: pip3 install Pillow
You should do the same for all the other Python dependencies as well: PyGObject, numpy, python-dateutil, urllib3, pyOpenSSL, and musicbrainzngs.
I should also add that if you did use Homebrew for any of these, you should probably uninstall them using brew uninstall xxx
before using pip3. That way Homebrew won't arbitrarily upgrade anything and break it later.
Hello Mark!
Thanks for quick note. Well I went in and deleted all of the packages that had been installed from homebrew. Then I installed only Python from homebrew. I also used homebrew for Gtk3, Glib and idk-pixbuf. I got the proper version numbers on the install.
I then used pip install to install the rest of the dependencies from PyGObject to musicbrainzngs.
I would up with the debugger stopping again on:
from PIL import Image, ImageFont, ImageDraw
I tried the line again with Pillow instead of PIL and got the same message.
I’m think about going through this again with another Mac that does not have Python or Homebrew on it yet.
Thanks ahead of time for any ideas you might have.
73 de dale - K0HYD
On October 31, 2021 at 5:48:00 AM, markjfine @.***) wrote:
I should also add that if you did use Homebrew for any of these, you should probably uninstall them using brew uninstall xxx before using pip3. That way Homebrew won't arbitrarily upgrade anything and break it later.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Just a hunch, but try typing brew list librsvg libxml2 adwaita-icon-theme gtk-mac-integration
and see if it returns anything in /usr/local/Cellar relating to those four packages. If any of those are missing, they may also have to be installed in Homebrew.
So, I've been playing around with creating a self-contained .app for Pan rather than running it like a reconfigured Linux binary. Works fine after creating Pan.app under dylibbuilder except you get the same kind of check-symbolic.svg error any time you try to show a menu with a checkbox in it:
Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg. This may indicate that pixbuf loaders or the mime database could not be found.
It also shows a warning at startup regarding quartz:
plugin '/usr/local/Cellar/gtk+3/3.24.30/lib/gtk-3.0/3.0.0/immodules/im-quartz.so' failed to register type '(null)'
Loading IM context type 'quartz' failed
So this is another clue what may be happening here, which may be related to how application sandboxing is handled in .apps as well as python3 under Monterrey.
Just in case XQuartz might be the answer in both cases (not being able to see it in my case), I'm just going to leave this link here: XQuartz
Realize this was over a year ago, but was just reviewing old open issues and came across this.
Having recently migrated from an Intel-based Mac running Catalina, to an M1-based ARM Mac running Ventura, I discovered something interesting: Homebrew no longer wants to be installed under the /usr/local prefix. It wants everything to be reinstalled under /opt/homebrew and the old stuff removed. In fact it wouldn't even install anything new until I followed their instructions for migrating everything.
I'm almost certain this is what you ran into.
Looking for help! Running MacOS Monterey Beta 10. nrsc5 compiles and runs like a champ. No issues here.
nrsc5-dui will not run. I carefully followed the steps given in the Read Me install section. Get this message and a Black Screen with a Title Bar upon launch. Here are the first two error messages. I'm lost!
(nrsc5-dui.py:75486): Gtk-WARNING **: 01:57:37.670: Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg. This may indicate that pixbuf loaders or the mime database could not be found.
(nrsc5-dui.py:75486): Gtk-WARNING **: 01:57:37.690: Error loading theme icon 'media-playback-start' for stock:
Any help would be appreciated.
73 de Dale - K0HYD