[Solved]Caffeine doesn't start in Fedora 21

Bug #1444317 reported by PietroChico
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Caffeine
Invalid
Undecided
Unassigned

Bug Description

Currently on Fedora 21, I manager to correctly install Caffeine, but it doesn't work. Here's the terminal output when I try to launch

caffeine
File "/usr/bin/caffeine", line 3
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/caffeine on line 3, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

I think Python is unable to get © char working, what can we do about that?

Revision history for this message
Riot T. (tearfall) wrote :

The same here. It doesn't start with the same message.

Revision history for this message
Riot T. (tearfall) wrote :

And I think I've solved it. Just read more carefully the link which is in error message. Then I've edited file /usr/bin/caffeine so that first two lines look like:

#!/usr/bin/python
# -*- coding: utf-8 -*-

And now it launches.

Revision history for this message
PietroChico (pietro-chico1) wrote :

OMG I didn't think about uft-8 encoding, because I started studing Python just two months ago.
Amazing, thanks dude :)

summary: - Caffeine doesn't start in Fedora 21
+ [Solved]Caffeine doesn't start in Fedora 21
Revision history for this message
Reuben Thomas (rrt) wrote :

There's something wrong here: current versions of Caffeine are Python 3, which don't need this. So either you're trying to run Caffeine with Python 2 (in which case I'm surprised it works at all) or you're using an old version of Python, in which case the bug report is out of date. Closing.

Revision history for this message
Reuben Thomas (rrt) wrote :

(As far as I can see, Fedora does not install Python 3 as /usr/bin/python.)

Changed in caffeine:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.