Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Not working under 2.99.1 #1

Closed
silberzwiebel opened this issue May 26, 2013 · 17 comments
Closed

Not working under 2.99.1 #1

silberzwiebel opened this issue May 26, 2013 · 17 comments

Comments

@silberzwiebel
Copy link

Hello,

sorry to say, but your plugin is not working under Rhythmbox 2.99.1.
This is the error-output:

Traceback (most recent call last):
  File "/home/thomas/.local/share/rhythmbox/plugins/OpenContainingFolder/OpenContainingFolder.py", line 65, in do_activate
    manager = shell.props.ui_manager
AttributeError: 'gi._gobject.GProps' object has no attribute 'ui_manager'

Rhythmbox is crashing completely if I try to access the options.

Thanks for fixing it!

silberzwiebel

@silberzwiebel
Copy link
Author

There is a an ongoing discussion over here: fossfreedom/coverart-browser#171

@donaghhorgan
Copy link
Owner

Hi, thanks for the bug report and the link to the discussion. I've been meaning to fix my plugins for 2.99 for a while now, but I've been really busy with college stuff (apologies), and I was away on holidays last week (I replied to your bug report via email when I was notified, but it doesn't seem to have been cross posted here for some reason...). Anyway, long story short, I fixed it this morning and just pushed a new version. I'd appreciate if you could test it and let me know whether the bug is fixed.

All the best,
Donagh

@silberzwiebel
Copy link
Author

Tested it and it works good! Thanks for the work!

silberzwiebel

@fossfreedom
Copy link

@donaghhorgan - can I suggest you git-tag the RB2.96 version and then retag for the RB2.99 version? Otherwise, those people that are not using RB2.99 will not be able to use your plugin.

@donaghhorgan
Copy link
Owner

@silberzwiebel No problem, thanks for the report.

@fossfreedom Good idea (I'm not too familiar with Git / version control), thanks! I've just pushed the changes now.

@fossfreedom
Copy link

@donaghhorgan - excellent! Well done.

BTW - I've been working on a framework to allow external plugins such as yours compatibility across all RB versions rather than just coding for one version or another.

You can see this in action here:

@donaghhorgan
Copy link
Owner

That's an excellent idea, is it complete (i.e. should I switch now?)?

@fossfreedom
Copy link

Myself, asermax and another dev have used it on approx 8 plugins so far. Occasionally I do some tweaks but you can usually just drop in the whole rb3compat module to get the latest (from coverart_browser master branch)

I'm working on some Action Toggle stuff at the moment but that should be complete by tomorrow.

@donaghhorgan
Copy link
Owner

Sounds great, I'll take a look at it tonight. Is it Python 3 proof? I haven't even considered how RB 3.0 is going to affect my code yet. Jonathan said 2to3 would take care of most of the conversion, but it's hardly backwards compatible. I'd prefer something more flexible, if possible.

@fossfreedom
Copy link

In theory it should be RB3 proof - I've already converted coverart_browser and coverart_search_providers to RB3 compatibility (again in the master branch only). I've used the "compatibility" functions in the rb3compat module to ensure backwards compatibility.

However - I've not been able to test a RB3.0 version yet compiled from Git - I'm waiting on Ubuntu 13.10 to become more stable and to include the requisite python3 modules that the Git version of RB requires.

Also ... I personally have a habit of leaving "print xxx" commands littering the source code rather than "print (xxx)" - so that will need to be double checked at some-point.

What I did to-do the conversion was to do a 2to3 on the source. Then looking at the diff, replace the python3 only function calls with the equivalent compatibility function in the rb3compat module.

@donaghhorgan
Copy link
Owner

@fossfreedom I finally got around to looking at your rb3compat module tonight, and I've just pushed a new version of the OpenContainingFolder plugin (tagged as v2.96+) that should be compatible with 2.96-2.99. I'm going to try to get around to fixing my other plugins this week (they've been broken long enough now...).

Is there a definitive version of the module? I found two different versions earlier, and ended up using the newer one, but wasn't sure... It might be an idea to stick it in its own repository

Thanks again for all your help!

@fossfreedom
Copy link

Hi - I'll have a look at this asap.

The idea of a new project sounds like a good idea. @asermax is cooking up a cleaned up version of the compat module at the mo'. When complete we'll look at this.

The latest version is found on the coverart-browser master branch.

Please can you rename rb3compat to something like "opencontainingfolder_rb3compat.py" - the reason why is because Peas/python uses the first file with this name it finds in the list of plugins. If two plugins share the same filename but each file is slightly different, plugins start behaving very oddly.

@donaghhorgan
Copy link
Owner

Cool, thanks. Just changed the name there, should be all good to go now.

@fossfreedom
Copy link

@donaghhorgan - just a quick note - I saw your mailing list request with the test file for adding new menu buttons on the library source. I had a quick look at this yesterday and tried some stuff like delaying adding the button after the query model was loaded. No joy. I suspect there is a bug in the way Jonathan Matthew made the changes but having had a glance through the rb-library-source.c file and comparing to rb-static-playlist-source.c I dont see any obvious differences that would cause this.

So - sorry, no ideas from me. Hopefully Jonathan will respond on the mailing list - or you may wish to prod him via a bugzilla report as well.

@donaghhorgan
Copy link
Owner

Hey, thanks for the help! I'm still tipping away at it - I've compiled RB from git master (post Jonathan's bug fix), but no luck so far. I'm not sure whether it's my fault or Jonathan's commit didn't fix whatever bug I'm having. I just sent a reply to the mailing list, so hopefully he'll get back to me in the coming days...

@fossfreedom
Copy link

I'm using ubuntu 13.10 (saucy) with the latest git code

after changing the plugin from python to python3 and using library-toolbar I see this:

pic

@donaghhorgan
Copy link
Owner

@fossfreedom Got it... The git version of RB is now using Python 3, and I hadn't switched the loader in the .plugin file. It's working for me now, but it's not a whole pile of use really. Essentially, the bug is in RB 2.99, the final version of which has already been released, but Jonathan's fix is only going to affect RB 3.0+. Therefore, if I fix my rating filters plugin, it'll be buggy in the already released 2.99. It's not ideal, but I can push ahead. I might try dropping Jonathan an email when I'm done and see if there's any will to release a 2.99.2 version...

Thanks again for all the help, and apologies for my (as usual) late replies. I've been tracking down bugs in Mathematica code I wrote last year all week, and hadn't the motivation to look at RB any night so far this week...

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

No branches or pull requests

3 participants