Bug 1281826 - [abrt] hamster-time-tracker: invalid syntax (hamster, line 165)
[abrt] hamster-time-tracker: invalid syntax (hamster, line 165)
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: hamster-time-tracker (Show other bugs)
23
x86_64 Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Ankur Sinha (FranciscoD)
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:17569b55cea6cb229996634b879...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-13 09:22 EST by Francesco Frassinelli (frafra)
Modified: 2016-02-12 07:21 EST (History)
3 users (show)

See Also:
Fixed In Version: hamster-time-tracker-2.0-0.2.rc1.fc23 hamster-time-tracker-2.0-0.2.rc1.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-12 06:53:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Francesco Frassinelli (frafra) 2015-11-13 09:22:28 EST
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 09:22:35 EST
Created attachment 1093671 [details]
File: backtrace
Comment 2 Francesco Frassinelli (frafra) 2015-11-13 09:22:37 EST
Created attachment 1093672 [details]
File: environ
Comment 3 Raphael Groner 2015-11-13 10:09:11 EST
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 13:09:53 EST
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 13:17:51 EST
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 14:23:47 EST
(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 15:37:18 EST
@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 15:34:33 EST
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 17:04:05 EST
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 17:04:06 EST
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 18:01:15 EST
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 18:25:48 EST
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 06:53:34 EST
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 07:21:18 EST
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.