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

  • Home
  • SEARCH
  • 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 9147147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:55:03+00:00 2026-06-17T10:55:03+00:00

If a GSettings schema exists and has been compiled, there is usually no problem

  • 0

If a GSettings schema exists and has been compiled, there is usually no problem reading from it. However, if it doesn’t exist, an error is usually thrown which cannot be handled. Try this in a Python file or console:

from gi.repository import Gio
try:
    settings = Gio.Settings("com.example.doesnotexist")
except:
    print "Couldn't load those settings!"

I’m being as broad as possible with the except, but this is the error that is thrown.

(process:10248): GLib-GIO-ERROR **: Settings schema ‘com.example.doesnotexist’ is not installed

What I basically want to do is find out if the com.example.doesnotexist schema exists or not; if not, then tell the user to run my setup script before using my application. Any other suggestions on doing this would be welcome.

  • 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-17T10:55:04+00:00Added an answer on June 17, 2026 at 10:55 am

    You can use GSettingsSchemaSource. For instance:

    > from gi.repository import Gio
    > source = Gio.SettingsSchemaSource.get_default()
    > source.lookup("org.gnome.Epiphany", True)
    <GSettingsSchema at 0xa462800>
    > source.lookup("com.example.doesnotexist", True)
    
    >
    

    According to the documentation, lookup should return NULL (None) if the schema does not exists, however in PyGObject returns NoneType. Anyway, you can use it to check whether the schema exists or not.

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

Sidebar

Related Questions

I'm trying to add an entry (that has been read from the keyboard) to
I have an existing application with a SQL database that has been coded using
I am getting error schema does not yet agree while creating new key-space on
I am getting orm:schema-tool => The supplied configuration uses the annotation metadata driver. The
Just getting into SQL stored queries right now... anyway, here's my database schema (simplified
Greetings Overflowers, Is there an SQL DBMS that allows me to create an indexed
Hey there. I have a c# application that parses txt files and imports the
I am getting the error described in title: Unknown column 'FeedbackType' in 'where clause'
I have the following start of an XSD: <?xml version=1.0 encoding=UTF-8?> <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns:no=http://www.sychophants.com>
I have a small schema consisting of ~10 classes mapped by jpa2 with hibernate

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.