Bug 1023479
| Summary: | AttributeError: 'exceptions.ValueError' object has no attribute 'msg' | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | John Sefler <jsefler> |
| Component: | python-rhsm | Assignee: | candlepin-bugs |
| Status: | CLOSED DUPLICATE | QA Contact: | John Sefler <jsefler> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | ckozak |
| 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: | 2013-10-30 18:54:20 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 | ||
deferring to RHEL70 possible dup of bug 1008808 1d98c49e53d39398d09a40e9ea7005a687f3284b 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 *** |
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.eng.bos.redhat.com subscription-manager subscribe --auto --servicelevel=STANDARD Stdout: Service level set to: STANDARD Installed Product Current Status: Product Name: Red Hat Enterprise Linux for IBM POWER Status: Unknown Stderr: Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 373, in on_ent_dir_changed self.on_change() File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 363, in on_change self.load() File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 116, in load self._parse_server_status() 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): subscription-manager-1.9.11-1.el6.ppc64 How reproducible: not Steps to Reproduce: 1. 2. 3. Actual results: above Expected results: Additional info: