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 1277256 - Encountering "TypeError: string indices must be integers, not str" when getting a Response: status=202 during an orgs query
Summary: Encountering "TypeError: string indices must be integers, not str" when getti...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-02 20:09 UTC by John Sefler
Modified: 2015-11-16 20:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-16 20:08:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1277261 0 unspecified CLOSED Encountering "KeyError: 'idCert'" when getting a Response: status=202 during registration 2021-02-22 00:41:40 UTC

Internal Links: 1277261

Description John Sefler 2015-11-02 20:09:09 UTC
Description of problem:
Encountering "TypeError: string indices must be integers, not str" when getting a Response: status=202 from production candlepin environment.  Note that this bug was written to capture and fix the traceback on the client.  The bigger problem is that the server should not be returning a 202. 




Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.26.11-1
subscription management rules: 5.15
subscription-manager: 1.15.9-15.el7
python-rhsm: 1.15.4-5.el7


How reproducible:
I suspect this issue is caused by the aftermath of the weekend outage https://mojo.redhat.com/docs/DOC-1053566
This bug is normally not reproducible.


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager orgs --username=qa --serverurl=subscription.rhn.redhat.com:443/subscription
Password: 
+-------------------------------------------+
          qa Organizations
+-------------------------------------------+

string indices must be integers, not str               <========== BANG!
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# tail -9 /var/log/rhsm/rhsm.log
2015-11-02 14:55:40,050 [DEBUG] subscription-manager:22500 @connection.py:523 - Making request: GET /subscription/users/qa%40redhat.com/owners
2015-11-02 14:55:40,592 [DEBUG] subscription-manager:22500 @connection.py:555 - Response: status=202
2015-11-02 14:55:40,595 [INFO] subscription-manager:22500 @managercli.py:707 - Successfully retrieved org list from server.
2015-11-02 14:55:40,598 [ERROR] subscription-manager:22500 @managercli.py:160 - Error: Unable to retrieve org list from server
2015-11-02 14:55:40,599 [ERROR] subscription-manager:22500 @managercli.py:161 - string indices must be integers, not str
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 715, in _do_command
    owner['displayName'], owner['key']) + "\n"
TypeError: string indices must be integers, not str

[root@jsefler-7 ~]# curl --stderr /dev/null -k -u qa:REDACTED https://subscription.rhn.redhat.com:443/subscription/users/qa%40redhat.com/owners | python -m json/tool
{
    "displayMessage": "The system is unable to complete the requested transaction",
    "requestUuid": "52f1e38e-97eb-4f5b-8c8d-ffe1783b2e5a"
}







For comparison, let's demonstrate the same calls against a happier stage environment with redacted stage credentials...

[root@jsefler-7 ~]# subscription-manager orgs --username=qa --serverurl=subscription.rhn.stage.redhat.com:443/subscription
Password: 
+-------------------------------------------+
          qa Organizations
+-------------------------------------------+

Name: Quality Assurance
Key:  711497

[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# tail -3 /var/log/rhsm/rhsm.log
2015-11-02 15:00:18,199 [DEBUG] subscription-manager:22597 @connection.py:523 - Making request: GET /subscription/users/qa%40redhat.com/owners
2015-11-02 15:00:19,575 [DEBUG] subscription-manager:22597 @connection.py:555 - Response: status=200, requestUuid=c486cc3c-49cb-4381-8892-1af7188fe5b2
2015-11-02 15:00:19,579 [INFO] subscription-manager:22597 @managercli.py:707 - Successfully retrieved org list from server.

[root@jsefler-7 ~]# curl --stderr /dev/null -k -u qa:REDACTED https://subscription.rhn.stage.redhat.com:443/subscription/users/qa%40redhat.com/owners | python -m json/tool
[
    {
        "contentPrefix": null,
        "created": "2011-02-24T13:43:53.000+0000",
        "defaultServiceLevel": null,
        "displayName": "Quality Assurance",
        "href": "/owners/711497",
        "id": "8a85f9812e4f4c84012e57e9561b0258",
        "key": "711497",
        "logLevel": null,
        "parentOwner": null,
        "updated": "2011-02-24T13:43:53.000+0000",
        "upstreamConsumer": null
    }
]

Comment 2 Barnaby Court 2015-11-16 20:08:15 UTC
Too low a priority to fix as it appears to be a gremlin related to a larger data center outage


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