0

This the error that is displayedI am learning to make apps for Elementary OS. I wrote my app it compiles well without any errors. But when I try to open the application, it displays a message stating gsettings schema isnt installed.

I looked up some other forums and tried out some of the steps. None seems to work.

Any help would be appreciated.

8
  • Hi! Can you provide some samples of the code you've written? And also it would be nice if you added the steps you aready tried.
    – Vlad
    Nov 20, 2020 at 9:32
  • I am following a YouTube video series by Alessandro Castellani. I divided the root directory of the project into sub folders like src, meson, build etc. I created .vala files for different purposes. One has the ain window properties, another has the headerbar properties etc. Nov 21, 2020 at 7:41
  • When I run the application from the src folder inside the build folder, it does not run. But the application used to run when I did not create .vala files for saving the save states. Nov 21, 2020 at 7:44
  • If you are going over Castellani's tutorial, you should have a data/gschema.xml file (with the gsettins for your app) and a meson/post_install.py script in your project. Are you able to 'ninja' and 'sudo ninja install' your app? The error you are getting might be from the fact that the gsettings schema is imported during the installation process of the app, not during building. Take a look in github.com/popvladaurel/torrential-remote. Also if your app is on github, you can supply a link to it?
    – Vlad
    Nov 21, 2020 at 8:05
  • ninja works but sudo ninja install doesn't. Terminal says failed to run install script. Nov 21, 2020 at 15:28

1 Answer 1

0

Thank you for sharing your code, looks good! Took me while to look over it (needed to set up a new elementary OS virtual machine), downloaded your code, built it, and indeed got the same error when trying to install it. enter image description here

That error led me to look into your post_install.py file, and noticed a typo on the first line (read more about shebang), a space had made its way where no space should be present: enter image description here

After changing it to #!/usr/bin/env python3, deleting the build folder, and running the build & install commands again, the schema was parsed successfully: enter image description here

And the app runs as expected: enter image description here

Vala is a nice programming language, and I wish you great success in your learning process. Never hesitate to ask for help when needed, and help others when you can.

3
  • The typo was in a comment. I didn't know that comments affect the code too. Thanks a lot Vlad. I am very grateful. Nov 25, 2020 at 14:08
  • That line is not a comment. It is a special line, read here for more information about it: stanford.edu/~jainr/basics.py Remeber to upvote and accept and answer if it helped you.
    – Vlad
    Nov 25, 2020 at 15:52
  • Oh!! Now I get it. Thankssss Nov 26, 2020 at 2:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.