You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Unit tests: MacOS 14 failures: gi-invoke-error-quark #29732
During a recent GitHub Actions workflow for unrelated pull request #29721, the following error appeared:
E gi._error.GError: gi-invoke-error-quark: Could not locate g_option_error_quark: dlopen(libglib-2.0.0.dylib, 0x0009): tried: 'libglib-2.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibglib-2.0.0.dylib' (no such file), '/usr/lib/libglib-2.0.0.dylib' (no such file, not in dyld cache), 'libglib-2.0.0.dylib' (no such file) (1)
Code for reproduction
This occurred for Python3.12 and Python3.13 on MacOS 14:
Edit: remove code-block markup surrounding non-code details
Edit: the failure appears to occur fairly reliably, so remove the description of it as transient
I think that the libglib-2.0.0.dylib linked library file that appears to be missing (dlopen fails to find it) should be provided by the glib Homebrew package, pulled in as a dependency of ffmpeg.
A next step could be to confirm whether the library file was included in the updated Brew package -- and if so, whether it was on the library load search path.
I think that the libglib-2.0.0.dylib linked library file that appears to be missing (dlopen fails to find it) should be provided by the glib Homebrew package, pulled in as a dependency of ffmpeg.
Hmm.. an earlier error hints at PyGObject as potentially more relevant:
gi._error.GError: gi-invoke-error-quark: Could not locate g_option_error_quark: dlopen(libglib-2.0.0.dylib, 0x0009): tried: 'libglib-2.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibglib-2.0.0.dylib' (no such file), '/usr/lib/libglib-2.0.0.dylib' (no such file, not in dyld cache), 'libglib-2.0.0.dylib' (no such file) (1)
PyGObject 4 is not available
(contrastingly, that message does not appear during the successful build - there we find PyGObject 4 is availableinstead)
I think this may be something to do with a recent dependency version upgrade taking place in GObject>=3.51:
I plan to open an experimental pull request to place an upper limit on the PyGObject package version installed during GitHub Actions unit testing, to learn whether that could (temporarily) resolve the issue.
I think this may be something to do with a recent dependency version upgrade taking place in GObject>=3.51:
Pull request #29734 seems to support that theory; pinning PyGObject<3.52.0 allows the GitHub Actions tests.yml workflows to succeed for MacOS 14 (both with py3.12 and also with py3.13).
changed the title [-][Bug]: Unit tests: transient MacOS 14 failures: gi-invoke-error-quark[/-][+][Bug]: Unit tests: MacOS 14 failures: gi-invoke-error-quark[/+]on Mar 12, 2025
@dstansby@timhoffm thanks again - I hope to figure out where this problem originates, so that we can remove the temporary version limit in the not-too-distant future; my guess is that there'll be a bug to report in GNOME's pygobject project, but I'm not certain yet.
By removing the Homebrew-provided gobject-introspection library as part of #29777, some progress appears to be made; a different and I think deeper dependency layer of cairo is next up to fail to resolve:
ImportError: Typelib file for namespace 'cairo', version '1.0' not found
PyGObject 4 is not available
I'd intended for solely the Homebrew-installed cairo to be provided, negating any requirement for a PyPI/pip-based install -- but it seems that pycairo was also retrieved from the Python package index:
Collecting pycairo>=1.16 (from PyGObject)
Using cached pycairo-1.27.0-cp313-cp313-macosx_14_0_arm64.whl
I am struggling to get PR #29777 to resolve this currently, and would be glad for help.
I think that there may be an incompatibility between recent versions of PyGObject as distributed on PyPI and the cairo and pycairo bindings available from either PyPI or Homebrew -- but I don't really understand the problem loading the cairo linked library yet.
I do note that Homebrew plans to update their own packaged version of PyGObject in the near future; so one option, if acceptable, could be to install from that instead of using pip install - either as a temporary solution until the interfaces restabilize, or longer-term if it is OK to migrate more CI dependencies to use Homebrew. The relevant Homebrew PR is: Homebrew/homebrew-core#210911
(it is currently blocked by the fact that freedesktop.org is temporarily down for some planned maintenance as they migrate to another infrastructure hosting provider)
The gobject-introspection Homebrew package should be the one providing the Cairo typelib.
It may be worth comparing the results when using Homebrew's Python package instead of the one installed using setup-actions/python.
I'm going to try to step away from the problem until early next week, because I think I've been getting stuck in various potentially-irrelevant details and reconsidering it from fresh may help.
I also came across this page for a separate reason but same error. Pinning pygobject<3.52.0 worked for me, specifically v3.50.2 (that's what version uv installed).
Activity
jayaddison commentedon Mar 11, 2025
I think that the
libglib-2.0.0.dyliblinked library file that appears to be missing (dlopenfails to find it) should be provided by theglibHomebrew package, pulled in as a dependency offfmpeg.Version 2.84.0 of
glibwas installed during both failed tests reported by this bug -- meanwhile, version 2.82.5 ofglibwas installed during one of the recent successful MacOS 14 pipelines on the mainline branch.A next step could be to confirm whether the library file was included in the updated Brew package -- and if so, whether it was on the library load search path.
jayaddison commentedon Mar 11, 2025
Hmm.. an earlier error hints at
PyGObjectas potentially more relevant:(contrastingly, that message does not appear during the successful build - there we find
PyGObject 4 is availableinstead)I think this may be something to do with a recent dependency version upgrade taking place in
GObject>=3.51:I plan to open an experimental pull request to place an upper limit on the
PyGObjectpackage version installed during GitHub Actions unit testing, to learn whether that could (temporarily) resolve the issue.jayaddison commentedon Mar 11, 2025
Pull request #29734 seems to support that theory; pinning
PyGObject<3.52.0allows the GitHub Actionstests.ymlworkflows to succeed for MacOS 14 (both withpy3.12and also withpy3.13).jayaddison commentedon Mar 12, 2025
jayaddison commentedon Mar 12, 2025
[-][Bug]: Unit tests: transient MacOS 14 failures: gi-invoke-error-quark[/-][+][Bug]: Unit tests: MacOS 14 failures: gi-invoke-error-quark[/+]jayaddison commentedon Mar 12, 2025
@dstansby @timhoffm thanks again - I hope to figure out where this problem originates, so that we can remove the temporary version limit in the not-too-distant future; my guess is that there'll be a bug to report in GNOME's
pygobjectproject, but I'm not certain yet.dstansby commentedon Mar 12, 2025
Fab, thanks for following up! I'll re-open this issue so we don't forget.
jayaddison commentedon Mar 19, 2025
By removing the Homebrew-provided
gobject-introspectionlibrary as part of #29777, some progress appears to be made; a different and I think deeper dependency layer ofcairois next up to fail to resolve:I'd intended for solely the Homebrew-installed
cairoto be provided, negating any requirement for a PyPI/pip-based install -- but it seems thatpycairowas also retrieved from the Python package index:I'm not sure what to do next, yet.
jayaddison commentedon Mar 19, 2025
Note also:
cairo(a linkable binary library) andpy3cairo(Python bindings to that library) appear as distinct packages in Homebrew.jayaddison commentedon Mar 19, 2025
I am struggling to get PR #29777 to resolve this currently, and would be glad for help.
I think that there may be an incompatibility between recent versions of
PyGObjectas distributed on PyPI and thecairoandpycairobindings available from either PyPI or Homebrew -- but I don't really understand the problem loading thecairolinked library yet.I do note that Homebrew plans to update their own packaged version of
PyGObjectin the near future; so one option, if acceptable, could be to install from that instead of usingpip install- either as a temporary solution until the interfaces restabilize, or longer-term if it is OK to migrate more CI dependencies to use Homebrew. The relevant Homebrew PR is: Homebrew/homebrew-core#210911(it is currently blocked by the fact that
freedesktop.orgis temporarily down for some planned maintenance as they migrate to another infrastructure hosting provider)jayaddison commentedon Mar 28, 2025
As a recap / status update:
pygobjectversion in our GitHub Actions CI for MacOS, but that is not a long-term fix.pygobjectv3.52+ requires migrating fromgirepository-1.0togirepository-2.0, based on the guidance at: https://docs.gtk.org/girepository/migrating-gi.htmlglibpackage instead ofgobject-introspection, because that's where the relevant functionality currently exists: https://github.com/Homebrew/homebrew-core/blob/7a6d3a8f14e8d4056674c0114e0e684a922e5259/Formula/g/glib.rb#L47-L51glibHomebrew package: a missingcairotypelib file is reported; this can be found in the build logs at: https://github.com/matplotlib/matplotlib/actions/runs/14048541275/job/39334454171#step:10:308glibHomebrew formula, so I've opened a discussion at: https://github.com/orgs/Homebrew/discussions/6051jayaddison commentedon Mar 28, 2025
Some notes/suggestions from discussion:
gobject-introspectionHomebrew package should be the one providing the Cairo typelib.setup-actions/python.I'm going to try to step away from the problem until early next week, because I think I've been getting stuck in various potentially-irrelevant details and reconsidering it from fresh may help.
jayaddison commentedon Apr 28, 2025
(I haven't yet gotten around to that testing - I hope to soon, but I'm not sure exactly when it'll be)
badrianiulian commentedon Sep 4, 2025
I found this page by searching for this particular error while trying to run deluge inside a python 3.13 virtual environment from command line:
This error was fixed by running
brew install pygobject3outside of the virtual environment andpip3 install PyGObjectinside the virtual environmentMaybe it helps someone.
samuelhoover commentedon Nov 14, 2025
I also came across this page for a separate reason but same error. Pinning
pygobject<3.52.0worked for me, specifically v3.50.2 (that's what version uv installed).