Bug 1052297

Summary: AttributeError: 'module' object has no attribute 'setdefaultencoding'
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Carter Kozak <ckozak>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: bkearney, ckozak, fsharath
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 09:37:38 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:
Bug Depends On:    
Bug Blocks: 863175    

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.