Bug 1023479 - AttributeError: 'exceptions.ValueError' object has no attribute 'msg'
AttributeError: 'exceptions.ValueError' object has no attribute 'msg'
Status: CLOSED DUPLICATE of bug 1008808
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-rhsm (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: candlepin-bugs
John Sefler
Depends On:
Blocks: rhsm-rhel70
  Show dependency treegraph
Reported: 2013-10-25 09:57 EDT by John Sefler
Modified: 2013-10-30 14:54 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-30 14:54:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Sefler 2013-10-25 09:57:25 EDT
Description of problem:
This is NOT a repeatable error and is probably due to a candlepin server problem in stage.  Nevertheless there was a traceback and maybe an improvement can be made.  The error was logged during a nightly automation run.

ssh root@ibm-js22-vios-01-lp1.rhts.eng.bos.redhat.com subscription-manager subscribe --auto --servicelevel=STANDARD
Service level set to: STANDARD
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for IBM POWER
Status: Unknown

Traceback (most recent call last):
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 373, in on_ent_dir_changed
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 363, in on_change
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 116, in load
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 135, in _parse_server_status
status = self.get_compliance_status()
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 333, in get_compliance_status
return status_cache.load_status(self.cp_provider.get_consumer_auth_cp(), self.identity.uuid)
File "/usr/share/rhsm/subscription_manager/cache.py", line 216, in load_status
self._sync_with_server(uep, uuid)
File "/usr/share/rhsm/subscription_manager/cache.py", line 201, in _sync_with_server
self.server_status = uep.getCompliance(uuid)
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 817, in getCompliance
return self.conn.request_get(method)
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 541, in request_get
return self._request("GET", method)
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 469, in _request
self.validateResponse(result, request_type, handler)
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 490, in validateResponse
log.error("JSON parsing error: %s" % e.msg)
AttributeError: 'exceptions.ValueError' object has no attribute 'msg'
ExitCode: 1

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
Comment 2 John Sefler 2013-10-25 12:19:08 EDT
deferring to RHEL70
Comment 3 John Sefler 2013-10-25 12:20:40 EDT
possible dup of bug 1008808
Comment 5 Carter Kozak 2013-10-30 14:54:20 EDT

 1008808: json ValueErrors have no .msg attribute

In cases where we expect a json body on an error
response, we try to parse it, and catch any exceptions
if it's not valid and ignore. Except we were attempting
to log the ValueError.msg, which doesn't exist, raising
an AttributeError.

*** This bug has been marked as a duplicate of bug 1008808 ***

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