Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8473151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:16:09+00:00 2026-06-10T17:16:09+00:00

I’m using ubuntu 12.04 and I’m trying to write a python plugin to query

  • 0

I’m using ubuntu 12.04 and I’m trying to write a python plugin to query the Rhythmbox database. The Rhythmbox version is v2.96 but this issue also occurs with v2.97 as well. When I do a python query, Ubuntu crashes with a segmentation fault.

I need to confirm the following is correct and if I’ve found a bug specific to Ubuntu or if I’ve misunderstood how to correctly query. If anyone else using another distro can confirm – this would be most welcome.

I’ve filed a bug report on bugzilla with regards to the segmentation fault. However, my question is not strictly about this – its specifically trying to confirm the correct python code to query for data.

Thus my question: is the code snippet below correct to query the Rhythmbox database or do I need to install an additional package to enable querying.

Steps:

  1. Enable the python console plugin
  2. type (or copy and paste line by line the following)

from gi.repository import RB, GLib

db = shell.props.db
query_model = RB.RhythmDBQueryModel.new_empty(db)
query = GLib.PtrArray()

db.query_append_params( query, RB.RhythmDBQueryType.EQUALS, RB.RhythmDBPropType.ARTIST, 'some artist name' )
db.query_append_params( query, RB.RhythmDBQueryType.EQUALS, RB.RhythmDBPropType.TITLE, 'some song name' )   

db.do_full_query_parsed(query_model, query)

for row in query_model:
    print row[0].get_string( RB.RhythmDBPropType.ARTIST )
    print row[0].get_string( RB.RhythmDBPropType.TITLE )

If ubuntu 12.04 when I type this line, Ubuntu crashes with a segmentation fault

db.query_append_params( query, RB.RhythmDBQueryType.EQUALS, RB.RhythmDBPropType.ARTIST, 'some artist name' )

Thus, have I actually used the first parameter in the call correctly – the Query Pointer Array (PtrArray) – or is my query function parameters incorrect?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:16:10+00:00Added an answer on June 10, 2026 at 5:16 pm

    and the answer is…

    Well, this issue is indeed a bug – but to answer my own question,

    yes the syntax to query for data in Rhythmbox is as correctly stated in the question.

    and there is a however…

    Querying for data only works for 64bit linux.

    Yes really – I have been testing 32bit live-cd’s of Fedora 17 as well as LMDE. Both exhibit the same segmentation fault issue as Ubuntu 12.04.

    The common factor is that I was testing Ubuntu 12.04/Fedora 17 and LMDE in their 32bit incarnations.

    Testing all three in their 64bit variants works as expected.

    The 32bit issue is a bug – and has been reported on bugzilla – but the question as posed has been answered.

    Thanks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.