Bug 1283556 - Does not start if a virtualenv is active
Summary: Does not start if a virtualenv is active
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-tweak-tool
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mohamed El Morabity
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-19 09:50 UTC by Gianluca Sforna
Modified: 2018-05-29 11:57 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:57:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Gianluca Sforna 2015-11-19 09:50:08 UTC
Activating a virtualenv and then running gnome-tweak-tools results in an error like:

$ gnome-tweak-tool 
Traceback (most recent call last):
  File "/usr/bin/gnome-tweak-tool", line 23, in <module>
    import gi
ImportError: No module named 'gi'


This is the result of the main executable running python like:

#!/usr/bin/env python

so it picks up the current python runtime and not the intended one (python 2?)

The python script should be patched to run with %{__python2}

Comment 1 Fedora End Of Life 2016-11-24 13:34:39 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Felix Schwarz 2016-12-08 16:23:22 UTC
still present in master. Mohamed: Should I send/commit a patch?

Comment 3 Jun Aruga 2017-02-27 11:59:49 UTC
I have same situation for my environment (f25).

```
$ rpm -q gnome-tweak-tool
gnome-tweak-tool-3.22.0-1.fc25.noarch
```

I am using source compiled python.

```
$ which python
/usr/local/python-2.7.13/bin/python
```

I want you to fix this, though right now I am using changing `/usr/bin/gnome-tweak-tool` from `#!/usr/bin/env python` to `#!/usr/bin/python`.


I also show you the result of `rpmlint` as a reference.

```
$ rpmlint -i ./*.spec /var/lib/mock/fedora-rawhide-x86_64/result/*.rpm
gnome-tweak-tool.noarch: E: wrong-script-interpreter /usr/bin/gnome-tweak-tool /usr/bin/env python
This script uses an interpreter which is either an inappropriate one or
located in an inappropriate directory for packaged system software.

gnome-tweak-tool.noarch: W: no-manual-page-for-binary gnome-tweak-tool
Each executable in standard binary directories should have a man page.

2 packages and 1 specfiles checked; 1 errors, 1 warnings.
```

Thank you.

Comment 4 Fedora End Of Life 2017-02-28 09:50:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 5 Jun Aruga 2018-03-05 14:03:44 UTC
Humm, this issue is still not fixed.

To Someone struggling for this issue.

Change the below shebang line manually to "#!/usr/bin/python3" or "#!/usr/bin/python" for old version of gnome-tweak-tool.

```
$ rpm -qf /usr/bin/gnome-tweak-tool
gnome-tweak-tool-3.26.4-1.fc27.noarch

$ cat /usr/bin/gnome-tweak-tool | head -1
#!/usr/bin/env python3
```

I wish this logic is executed in genome-tweak-tool.spec file.

Comment 6 Fedora End Of Life 2018-05-03 08:46:07 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2018-05-29 11:57:04 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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