Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: %X format: an integer is required, not float (4.1.5 in rawhide) #81

Closed
eddy02 opened this issue Nov 27, 2015 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@eddy02
Copy link

eddy02 commented Nov 27, 2015

Version 4.1.4 is ok.
But version 4.5.1 hangs :

/usr/lib/python3.5/site-packages/yumex/init.py:69: Warning: invalid cast from 'GtkBox' to 'GtkWindow'
self.ui.add_from_file(const.DATA_DIR + '/yumex.ui')

(yumex-dnf:5614): Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed

(yumex-dnf:5614): Gtk-WARNING **: State 0 for YumexPackageView 0x55c7e2a74c00 doesn't match state 128 set via gtk_style_context_set_state ()
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/yumex/init.py", line 1329, in do_command_line
self.do_activate()
File "/usr/lib/python3.5/site-packages/yumex/init.py", line 1232, in do_activate
self.win = YumexWindow(self, self.status)
File "/usr/lib/python3.5/site-packages/yumex/init.py", line 401, in init
CONFIG.conf.color_normal = color_to_hex(color_normal)
File "/usr/lib/python3.5/site-packages/yumex/misc.py", line 118, in color_to_hex
return rgb_to_hex(color.red, color.green, color.blue)
File "/usr/lib/python3.5/site-packages/yumex/misc.py", line 114, in rgb_to_hex
return "#%02X%02X%02X" % (r, g, b)
TypeError: %X format: an integer is required, not float

@timlau timlau added the bug label Nov 27, 2015
@timlau
Copy link
Owner

timlau commented Nov 27, 2015

Think you ar talking about 4.1.5, not 4.5.1 ;-)

What version of gtk is installed
It could be related to these changes in gtk.
https://blogs.gnome.org/mclasen/2015/11/20/a-gtk-update/

@timlau timlau self-assigned this Nov 27, 2015
@eddy02
Copy link
Author

eddy02 commented Nov 27, 2015

Sorry.
yumex-dnf 4.1.5, version with gtk-3.19.3

I'll try to downgrade gtk for testing.
Thanks

@timlau
Copy link
Owner

timlau commented Nov 27, 2015

@eddy02 does 4.1.4 work for you in current Rawhide ?, many others have problems because dnfdaemon will not load.
https://bugzilla.redhat.com/show_bug.cgi?id=1280181

@timlau
Copy link
Owner

timlau commented Nov 27, 2015

This could also be a change in Python 3.5

Try running this command and see if you get an error
python3 -c "print('%02X' % 255.0)"

@timlau timlau added this to the 4.2.0 milestone Nov 27, 2015
@timlau
Copy link
Owner

timlau commented Nov 27, 2015

OK, I have fixed it in 4.1.x & 4.2.x

@timlau timlau closed this as completed Nov 27, 2015
@timlau timlau changed the title 4.1.5 rawhide issue. TypeError: %X format: an integer is required, not float (4.1.5 in rawhide) Dec 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants