Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When environment variable LANG is set or is set to some unsupported string, then it is not possible to open Online Documentaion in subscription-manager-gui.
Version-Release number of selected component (if applicable):
$ subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.33-1
subscription management rules: 5.23
subscription-manager: git #: ab8f6e98a3e56d6a166dcd40655d857309f85698
python-rhsm: git #: ab8f6e98a3e56d6a166dcd40655d857309f85698
How reproducible:
Always
Steps to Reproduce:
1. Unset environment variable LANG:
$ unset LANG
2. Start subscription manager GUI
$ subscription-manager-gui
3. Try to open Help->Online Documentation
Actual results:
Traceback (most recent call last):
File "/home/jiri/github/candlepin/subscription_manager/src/subscription_manager/gui/managergui.py", line 547, in _online_docs_item_clicked
webbrowser.open_new(self._get_online_doc_url())
File "/home/jiri/github/candlepin/subscription_manager/src/subscription_manager/gui/managergui.py", line 572, in _get_online_doc_url
url = ONLINE_DOC_URL_TEMPLATE % (lang.replace("_", "-"))
AttributeError: 'NoneType' object has no attribute 'replace'
Expected results:
Online documentation web page is opened in preferred web browser.
Additional info:
When environment variable LANG is set to some unsupported variable e.g.:
$ export LANG="alphabet.utf8"
, then online documentation web page is opened in preferred web browser with following note in terminal:
(process:27598): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Reproducing the failure on RHEL74
=================================
subscription-manager: 1.19.21-1.el7
python-rhsm: 1.19.9-1.el7
[root@dhcp35-85 ~]# unset LANG
Try to open Help->Online Documentation from subscription-manager-gui
[root@dhcp35-85 ~]# subscription-manager-gui
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/subscription_manager/gui/managergui.py", line 537, in _online_docs_item_clicked
webbrowser.open_new(self._get_online_doc_url())
File "/usr/lib/python2.7/site-packages/subscription_manager/gui/managergui.py", line 562, in _get_online_doc_url
url = ONLINE_DOC_URL_TEMPLATE % (lang.replace("_", "-"))
AttributeError: 'NoneType' object has no attribute 'replace'
Verifying on RHEL75
===================
on,
subscription-manager-rhsm-certificates-1.20.5-1.el7.x86_64
subscription-manager-gui-1.20.5-1.el7.x86_64
subscription-manager-rhsm-1.20.5-1.el7.x86_64
subscription-manager-1.20.5-1.el7.x86_64
subscription-manager-initial-setup-addon-1.20.5-1.el7.x86_64
subscription-manager-plugin-container-1.20.5-1.el7.x86_64
Observed that when LANG was unset , the online-documentation help was launched without any error message. Also verified that setting LANG to unsupported value continues to open the online documentation web page along with a note on the terminal
[root@dhcp35-157 ~]# echo $LANG
en_US.UTF-8
[root@dhcp35-157 ~]# unset LANG
[root@dhcp35-157 ~]# echo $LANG
[root@dhcp35-157 ~]# subscription-manager-gui
launch online-documentation , ^ no trace back message was observed.
[root@dhcp35-157 ~]# echo $LANG
[root@dhcp35-157 ~]# export LANG=alphabet.utf8
[root@dhcp35-157 ~]# echo $LANG
alphabet.utf8
[root@dhcp35-157 ~]# subscription-manager-gui
(subscription-manager-gui:29772): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Fontconfig warning: ignoring alphabet.utf8: not a valid language tag
^^ observed this note on the terminal when launched online help documentation with a unsupported language.
Based on the above observations . marking the bug as verified!!
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:0681
Description of problem: When environment variable LANG is set or is set to some unsupported string, then it is not possible to open Online Documentaion in subscription-manager-gui. Version-Release number of selected component (if applicable): $ subscription-manager version server type: Red Hat Subscription Management subscription management server: 2.0.33-1 subscription management rules: 5.23 subscription-manager: git #: ab8f6e98a3e56d6a166dcd40655d857309f85698 python-rhsm: git #: ab8f6e98a3e56d6a166dcd40655d857309f85698 How reproducible: Always Steps to Reproduce: 1. Unset environment variable LANG: $ unset LANG 2. Start subscription manager GUI $ subscription-manager-gui 3. Try to open Help->Online Documentation Actual results: Traceback (most recent call last): File "/home/jiri/github/candlepin/subscription_manager/src/subscription_manager/gui/managergui.py", line 547, in _online_docs_item_clicked webbrowser.open_new(self._get_online_doc_url()) File "/home/jiri/github/candlepin/subscription_manager/src/subscription_manager/gui/managergui.py", line 572, in _get_online_doc_url url = ONLINE_DOC_URL_TEMPLATE % (lang.replace("_", "-")) AttributeError: 'NoneType' object has no attribute 'replace' Expected results: Online documentation web page is opened in preferred web browser. Additional info: When environment variable LANG is set to some unsupported variable e.g.: $ export LANG="alphabet.utf8" , then online documentation web page is opened in preferred web browser with following note in terminal: (process:27598): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale.