Bug 974427
Summary: | dnf fails on all commands with fatal error: "global name 'os' is not defined" | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | craigbarnes85 |
Component: | dnf | Assignee: | Ales Kozumplik <akozumpl> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 19 | CC: | akozumpl, jzeleny, pnemade, zbyszek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libsolv-0.3.0-5.git228d412.fc19 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-07-01 01:37:18 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
craigbarnes85
2013-06-14 07:47:58 UTC
Sorry, that backtrace got mangled by my editor. It was supposed to be: $ sudo dnf update Failed to set locale, defaulting to C Traceback (most recent call last): File "/bin/dnf", line 35, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 304, in user_main errcode = main(args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 39, in main _main(base, args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 44, in _main dnf.i18n.setup_locale() File "/usr/lib/python2.7/site-packages/dnf/i18n.py", line 53, in setup_locale os.environ['LC_ALL'] = 'C' NameError: global name 'os' is not defined Adding "import os" to i18n.py seems to fix it. This is triggered each time python fails to set the locale (perhaps because the respective locale files are not present on the system). importing the 'os' module indeed fixes this for the fallback scenario. Fixed by e11d928, this will be included with dnf-0.3.8. *** Bug 976002 has been marked as a duplicate of this bug. *** libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/libsolv-0.3.0-5.git228d412.fc19,dnf-0.3.8-2.git85524ae.fc19,hawkey-0.3.14-1.git78b3aa0.fc19,librepo-0.0.4-2.fc19 Package libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing libsolv-0.3.0-5.git228d412.fc19 librepo-0.0.4-2.fc19 hawkey-0.3.14-1.git78b3aa0.fc19 dnf-0.3.8-2.git85524ae.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-11602/libsolv-0.3.0-5.git228d412.fc19,dnf-0.3.8-2.git85524ae.fc19,hawkey-0.3.14-1.git78b3aa0.fc19,librepo-0.0.4-2.fc19 then log in and leave karma (feedback). libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. |