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

pitivi: fix path to gst-python #29126

Closed
wants to merge 1 commit into from
Closed

pitivi: fix path to gst-python #29126

wants to merge 1 commit into from

Conversation

rycee
Copy link
Member

@rycee rycee commented Sep 8, 2017

Motivation for this change

To make the program start up. Without this the startup errors out as follows:

$ ./result/bin/pitivi 

(gst-plugin-scanner:8821): GStreamer-WARNING **: Failed to load plugin '/nix/store/0afmvlyh2b6pdnpn1wanzcm5paf6afl1-gst-transcoder-1.8.0/lib/gstreamer-1.0/libgsttranscoderplugin.so': libgstpbutils-1.0.so.0: cannot open shared object file: No such file or directory

** (gst-plugin-scanner:8821): CRITICAL **: pygobject initialization failed

** (.pitivi-wrapped:8820): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
Failed to initialize modules
Traceback (most recent call last):
  File "/nix/store/5i5g1zsbp091gzjk7280l6c23b86333x-pitivi-0.96/bin/.pitivi-wrapped", line 132, in <module>
    _initialize_modules()
  File "/nix/store/5i5g1zsbp091gzjk7280l6c23b86333x-pitivi-0.96/bin/.pitivi-wrapped", line 109, in _initialize_modules
    initialize_modules()
  File "/nix/store/5i5g1zsbp091gzjk7280l6c23b86333x-pitivi-0.96/lib/pitivi/python/pitivi/check.py", line 338, in initialize_modules
    from pitivi.utils import validate
  File "/nix/store/5i5g1zsbp091gzjk7280l6c23b86333x-pitivi-0.96/lib/pitivi/python/pitivi/utils/validate.py", line 29, in <module>
    from pitivi.utils import timeline as timelineUtils
  File "/nix/store/5i5g1zsbp091gzjk7280l6c23b86333x-pitivi-0.96/lib/pitivi/python/pitivi/utils/timeline.py", line 25, in <module>
    from pitivi.utils import ui
  File "/nix/store/5i5g1zsbp091gzjk7280l6c23b86333x-pitivi-0.96/lib/pitivi/python/pitivi/utils/ui.py", line 539, in <module>
    (_("%d fps") % 12, Gst.Fraction(12.0, 1.0)),
TypeError: object() takes no parameters
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

This fixes the `object() takes no parameters` error that shows up on
startup.
@rycee rycee added 0.kind: regression Something that worked before working no longer 9.needs: port to stable A PR needs a backport to the stable release. labels Sep 8, 2017
@mention-bot
Copy link

@rycee, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bjornfor, @lethalman and @FRidh to be potential reviewers.

@@ -46,6 +46,8 @@ in stdenv.mkDerivation rec {
dbus-python
]);

PYTHONPATH = "${python3Packages.gst-python}/lib/${python3Packages.python.sitePackages}";
Copy link
Member

@Mic92 Mic92 Sep 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I first wondered what this change fixed, but saw that CONFIGURED_PYTHONPATH changed within the wrapped python script pick it up, which is part of the meson buildsystem: https://github.com/GNOME/pitivi/blob/master/meson.build#L28

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I didn't know either but when I was searching around I saw somewhere that this error was related to Python not finding gst-python and then I dug around a bit and found this little trick.

Copy link
Member

@FRidh FRidh Sep 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gst-python has a lib inside a lib folder? Shouldn't that be fixed instead...?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FRidh Yeah, it does. I've been looking a bit at that as well and hope to fix it. My first fix attempt didn't work so I did Pitivi instead since that's what I wanted in the first place :-)

I'll continue looking at gst-python…

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rycee the preConfigure is incorrect:

$out/lib/${python.sitePackages}

should be

$out/${python.sitePackages}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I swear that was the "first fix attempt" I mentioned and it didn't work. But now I tried it again and it worked!

💩

I'll make a PR for gst-python with the corrected output path…

@rycee
Copy link
Member Author

rycee commented Sep 8, 2017

Rebased to master in c10a1c6. Thanks @Mic92 for having a look at the PR!

@rycee rycee closed this Sep 8, 2017
@rycee rycee deleted the fix/pitivi branch September 8, 2017 18:52
@rycee rycee mentioned this pull request Sep 8, 2017
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: regression Something that worked before working no longer 9.needs: port to stable A PR needs a backport to the stable release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants