Bug 1281826 - [abrt] hamster-time-tracker: invalid syntax (hamster, line 165)
Summary: [abrt] hamster-time-tracker: invalid syntax (hamster, line 165)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hamster-time-tracker
Version: 23
Hardware: x86_64
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:17569b55cea6cb229996634b879...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-13 14:22 UTC by Francesco Frassinelli (frafra)
Modified: 2016-02-12 12:21 UTC (History)
3 users (show)

Fixed In Version: hamster-time-tracker-2.0-0.2.rc1.fc23 hamster-time-tracker-2.0-0.2.rc1.fc22
Clone Of:
Environment:
Last Closed: 2016-02-12 11:53:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (144 bytes, text/plain)
2015-11-13 14:22 UTC, Francesco Frassinelli (frafra)
no flags Details
File: environ (1.65 KB, text/plain)
2015-11-13 14:22 UTC, Francesco Frassinelli (frafra)
no flags Details

Description Francesco Frassinelli (frafra) 2015-11-13 14:22:28 UTC
Version-Release number of selected component:
hamster-time-tracker-1.04-5.fc23

Additional info:
reporter:       libreport-2.6.2
cmdline:        python /usr/bin/hamster overview
executable:     /usr/bin/hamster
kernel:         4.2.5-300.fc23.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
invalid syntax (hamster, line 165)

  File "/usr/bin/hamster", line 165
    print "\n".join(formats)
             ^
SyntaxError: invalid syntax

Comment 1 Francesco Frassinelli (frafra) 2015-11-13 14:22:35 UTC
Created attachment 1093671 [details]
File: backtrace

Comment 2 Francesco Frassinelli (frafra) 2015-11-13 14:22:37 UTC
Created attachment 1093672 [details]
File: environ

Comment 3 Raphael Groner 2015-11-13 15:09:11 UTC
Maybe we want to try the release candidate of v2.0 from upstream?
https://github.com/projecthamster/hamster/releases/tag/v2.0-rc1

> type:           Python3
Why Python3? I do not see any support for Python3 at upstream. Did you change your local settings for the default python interpreter?

Comment 4 Felix Schwarz 2015-11-13 18:09:53 UTC
Likely a Python3 venv is active.

head /usr/bin/hamster
#!/usr/bin/env python
# - coding: utf-8 -

I think it's a common Fedora practice to replace the env call with "/usr/bin/python".

Comment 5 Francesco Frassinelli (frafra) 2015-11-13 18:17:51 UTC
Sorry, my fault, I switched over python3 by default (after updating to F23) because I thought it was the default interpreter for this version (https://fedoraproject.org/wiki/Changes/Python_3_as_Default).

Comment 6 Felix Schwarz 2015-11-13 19:23:47 UTC
(In reply to Francesco Frassinelli (frafra) from comment #5)
> Sorry, my fault,

I think the hamster package should be changed anyway because a venv is not guaranteed to have all required modules.

> I switched over python3 by default (after updating to F23)
> because I thought it was the default interpreter for this version
> (https://fedoraproject.org/wiki/Changes/Python_3_as_Default).

/usr/bin/python and "env python" should alway point to Python 2.x as recommended in PEP 0394 (also mentioned on the wiki page above) because just too many things break if you use Python 3 instead of Python 2.

Comment 7 Raphael Groner 2015-11-13 20:37:18 UTC
@Maintainer, please fix this as suggested in comment #4.

> %install
[…]
> sed -i -e '/^#!\//, 1d' %{buildroot}%{_bindir}/hamster
> sed -i -e '1i#!%{__python2}' %{buildroot}%{_bindir}/hamster

https://fedoraproject.org/wiki/Packaging_tricks#Remove_shebang_from_files
https://fedoraproject.org/wiki/Packaging_tricks#Add_shebang

Comment 8 Fedora Update System 2016-02-02 20:34:33 UTC
hamster-time-tracker-2.0-0.1.rc1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-401ab10316

Comment 9 Fedora Update System 2016-02-02 22:04:05 UTC
hamster-time-tracker-2.0-0.2.rc1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-01bd33e7e6

Comment 10 Fedora Update System 2016-02-02 22:04:06 UTC
hamster-time-tracker-2.0-0.2.rc1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e7bfef7108

Comment 11 Fedora Update System 2016-02-03 23:01:15 UTC
hamster-time-tracker-2.0-0.2.rc1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e7bfef7108

Comment 12 Fedora Update System 2016-02-03 23:25:48 UTC
hamster-time-tracker-2.0-0.2.rc1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-01bd33e7e6

Comment 13 Fedora Update System 2016-02-12 11:53:34 UTC
hamster-time-tracker-2.0-0.2.rc1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2016-02-12 12:21:18 UTC
hamster-time-tracker-2.0-0.2.rc1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.