Friday, May 3, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 602  / 2 Years ago, mon, december 6, 2021, 5:10:27

I am trying to learn to develop apps in ubuntu and currently i am going through this tutorial.



As shown in the video I am writing the below given codes:



self.refreshbutton = self.builder.get_object("refreshbutton")
def on_refreshbutton_clicked(self, widget):
print "Refresh"


As soon as I try to run my application it is giving me an error :



I type this command to run my application : quickly run



(trickybrowser:4418): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1971:11: Not using units is deprecated. Assuming 'px'.

(trickybrowser:4418): Gtk-WARNING **: Failed to parse /usr/share/themes/mac-os-lion-theme-v2/gtk-3.0/settings.ini: Key file contains line '/* ' which is not a key-value pair, group, or comment
Traceback (most recent call last):
File "bin/trickybrowser", line 32, in <module>
import trickybrowser
File "/home/tricky/trickybrowser/trickybrowser/__init__.py", line 14, in <module>
from trickybrowser import TrickybrowserWindow
File "/home/tricky/trickybrowser/trickybrowser/TrickybrowserWindow.py", line 32
print "Refresh"
^
IndentationError: expected an indented block

More From » application-development

 Answers
4
(trickybrowser:4418): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1971:11: Not using units is deprecated. Assuming 'px'.

(trickybrowser:4418): Gtk-WARNING **: Failed to parse /usr/share/themes/mac-os-lion-theme-v2/gtk-3.0/settings.ini: Key file contains line '/* ' which is not a key-value pair, group, or comment


These 2 Gtk-WARNINGS are due to some errors in the settings.ini file and gtk-widgets.css of the mac-os-lion theme.



To Correct them,




  • sudo gedit /usr/share/themes/mac-os-lion-theme-v2/gtk-3.0/settings.ini.


    Use # for comments instead of * .. */




#
# AUTHOR: mbossg
# WEBSITE: http://mbossg.deviantart.com
# LICENSE: GPL
# DESCRIPTION: A minimalistic and usable theme made for gtk3 apps.
#



  • sudo gedit /usr/share/themes/mac-os-lion-theme-v2/gtk-3.0/gtk-widgets.css.


    Goto line number 1971 and replace padding: 8; with padding: 8px;


  • That's it. No more warnings from Gtk. Have a Happy Time using mac-os-lion-theme !!!



[#35365] Monday, December 6, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
otatorm

Total Points: 218
Total Questions: 113
Total Answers: 124

Location: British Indian Ocean Territory
Member since Tue, Feb 22, 2022
2 Years ago
otatorm questions
;