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.
Bug 1052297 - AttributeError: 'module' object has no attribute 'setdefaultencoding'
Summary: AttributeError: 'module' object has no attribute 'setdefaultencoding'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Carter Kozak
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2014-01-13 15:19 UTC by John Sefler
Modified: 2014-09-15 00:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:37:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2014-01-13 15:19:47 UTC
Description of problem:


Version-Release number of selected component (if applicable):
[root@jsefler-7server ~]# rpm -q subscription-manager python-rhsm python
subscription-manager-1.10.10-1.git.9.c07cb2c.el7.x86_64
python-rhsm-1.10.10-1.git.0.159dc3d.el7.x86_64
python-2.7.5-10.el7.x86_64


How reproducible:
Just started happening - I suspect one of the pull requests that got merged to master around 1/10/2014


Steps to Reproduce:
[root@jsefler-7server ~]# rhn-migrate-classic-to-rhsm --help
Traceback (most recent call last):
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 21, in <module>
    sys.setdefaultencoding('utf-8')
AttributeError: 'module' object has no attribute 'setdefaultencoding'
[root@jsefler-7server ~]# rhn-migrate-classic-to-rhsm --help
Traceback (most recent call last):
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 21, in <module>
    sys.setdefaultencoding('utf-8')
AttributeError: 'module' object has no attribute 'setdefaultencoding'


Actual results:
above

Expected results:
rhn-migrate-classic-to-rhsm help information

Additional info:
nothing was logged to /var/log/rhsm/rhsm.log

Comment 1 Carter Kozak 2014-01-13 16:00:22 UTC
commit 93875e530b4a7b2d135165750e083da63b52b0c6
Author: ckozak <ckozak>
Date:   Mon Jan 13 10:59:01 2014 -0500

    1052297: delay import of site module

Comment 4 Sharath Dwaral 2014-01-24 16:26:17 UTC
Version

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.2-1
subscription-manager: 1.10.11-1.git.2.e96f6cd.el7
python-rhsm: 1.10.11-1.git.0.17362f9.el7

Verification

# rhn-migrate-classic-to-rhsm --help
Usage: rhn-migrate-classic-to-rhsm [OPTIONS]

Options:
  -h, --help            show this help message and exit
  -f, --force           ignore channels not available on RHSM
  -g, --gui             launch the GUI tool to attach subscriptions, instead
                        of auto-attaching
  -n, --no-auto         don't execute the auto-attach option while registering
                        with subscription manager
  -s SERVICELEVEL, --servicelevel=SERVICELEVEL
                        service level to follow when attaching subscriptions,
                        for no service level use --servicelevel=""
  --serverurl=SERVERURL
                        specify the subscription management server to migrate
                        to
  --redhat-user=REDHATUSER
                        specify the Red Hat user name
  --redhat-password=REDHATPASSWORD
                        specify the Red Hat password
  --subscription-service-user=SUBSERVICEUSER
                        specify the subscription service user name
  --subscription-service-password=SUBSERVICEPASSWORD
                        specify the subscription service password
  --no-proxy            don't use RHN proxy settings with subscription
                        management server
  --org=ORG             organization to register to
  --environment=ENVIRONMENT
                        environment to register to


No traceback thrown.

VERIFIED

Comment 5 Ludek Smid 2014-06-13 09:37:38 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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