Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matplotlib is missing GSettings #25351

Open
rnhmjoj opened this issue Apr 30, 2017 · 17 comments
Open

matplotlib is missing GSettings #25351

rnhmjoj opened this issue Apr 30, 2017 · 17 comments

Comments

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Apr 30, 2017

Issue description

When opening the file picker of a matplotlib (gtk3 backend) window the process crashes with this error:
GLib-GIO-ERROR **: No GSettings schemas are installed on the system
I think it needs wrapGAppsHook but I'm not really sure how that works.

Steps to reproduce

$ nix-shell -p 'pythonPackages.matplotlib.override {enableGtk3=true;}' --run 'python -c "import matplotlib.pyplot as plt; plt.plot([1,2,3],[4,5,6]); plt.show()"'

Technical details

NixOS version: 17.09pre106117.c90998d5cf

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented May 6, 2017

Reading #24880 I tried adding to the buildInputs wrapGAppsHook and gsettings_desktop_schemas but it didn't help. Anyone knows how to fix it?

@mmahut
Copy link
Member

mmahut commented Aug 19, 2019

Any news on this issue?

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Sep 4, 2019

Nothing new: It's still happening. Also the package probably has to be wrapped for #65399 .
I have no idea how to to do that on a python library, though.

@doronbehar
Copy link
Contributor

I've just solved this error in an end user application - #84449 The solution is to use wrapGAppsHook which adds something like this to the wrapper:

export XDG_DATA_DIRS='/nix/store/nwksqszw0dakmizrrlql9pamcf39vnxg-gtk+3-3.24.14/share/gsettings-schemas/gtk+3-3.24.14:/nix/store/slmsmbyfgf1rqj9rp6s1y33cqaz8q203-gsettings-desktop-schemas-3.34.0/share/gsettings-schemas/gsettings-desktop-schemas-3.34.0:/nix/store/nwksqszw0dakmizrrlql9pamcf39vnxg-gtk+3-3.24.14/share/gsettings-schemas/gtk+3-3.24.14:/nix/store/slmsmbyfgf1rqj9rp6s1y33cqaz8q203-gsettings-desktop-schemas-3.34.0/share/gsettings-schemas/gsettings-desktop-schemas-3.34.0'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
export XDG_DATA_DIRS='/nix/store/92p57svcsqgwa5fgb8z9qg7m7r66nx7a-guvcview-2.0.6/share'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS

To solve this issue in the context of using matplotlib is somewhat challenging because matplotlib is a library - what exactly would we wrap? #83321 is exactly what we need.

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Apr 7, 2020

@doronbehar Sadly there is no way, yet. The situation will hopefully change once structured attributes are enabled in nixpkgs and declarative wrappers are implemented. See this issue #72074.

what exactly would we wrap? #83321 is exactly what we need.

Yes, I tried implementing a temporary solution with #83321 because this will take a while before it's usable. It needs some feedback and a lot of testing but it should be working.

@stale
Copy link

stale bot commented Oct 4, 2020

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 4, 2020
@doronbehar
Copy link
Contributor

doronbehar commented Oct 4, 2020 via email

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 4, 2020
@stale
Copy link

stale bot commented Apr 7, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 7, 2021
@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Apr 7, 2021

Still an issue.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 7, 2021
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/jupyter-breaks-matplotlib/15468/2

@stale
Copy link

stale bot commented Apr 16, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 16, 2022
@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Apr 16, 2022

Still an issue, sadly.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 16, 2022
@charmoniumQ
Copy link
Contributor

Is this blocked by RFC 0075?

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Jul 6, 2023

Not really, it's possible to fix these issues without a unified wrapping mechanism. See #102949 (comment)

@Artturin
Copy link
Member

Artturin commented Jul 8, 2023

@jtojnar
Copy link
Member

jtojnar commented Jul 8, 2023

I think the simplest solution would be hardcoding the schema path in GTK itself. We now have semi-automated patch generating tooling (see evolution-data-server package for an example), I just have not gotten around to applying it to GTK yet.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/error-when-trying-to-use-pyqt5-backend-of-matplotlib/46065/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants