title: unexpected attribute error in python object
body: <p>I'm parsing objects returned by the suds client from a Web Services SOAP API</p>
  
  <p>I have a list of attributeObjects, like</p>
  
  <pre><code>(defectStateAttributeValueDataObj){
     attributeDefinitionId = 
        (attributeDefinitionIdDataObj){
           name = "Comment"
        }
     attributeValueId = 
        (attributeValueIdDataObj){
           name = "Owner changed because of default owner assignment specified in the component map"
        }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>(defectStateAttributeValueDataObj){
     attributeDefinitionId = 
        (attributeDefinitionIdDataObj){
           name = "OwnerName"
        }
     attributeValueId = 
        (attributeValueIdDataObj){
           name = "Schmoe, Joe"
        }
   }
  </code></pre>
  
  <p>I use the following loop to extract key/value pairs:</p>
  
  <pre><code>for defect in myDefectsPage.mergedDefects :
     print defect.cid,
     for attribute in defect.defectStateAttributeValues:
         print attribute
         attr= attribute.attributeDefinitionId.name
         val=attribute.attributeValueId.name
         print attr,'=',val,
         print ""     
  </code></pre>
  
  <p>(The above objects are results of the print attribute command) </p>
  
  <p>This will work  as expected for EVERY attribute, except the one where attribute.attributeDefinitionId.name == "Comment"</p>
  
  <p>for that one I get the </p>
  
  <p>Traceback (most recent call last):
    File , line 63, in 
      val=attribute.attributeValueId.name
  AttributeError: 'Text' object has no attribute 'name'</p>
  
  <p>which is strange, because if I use
      val=attribute.attributeValueId #.name
  it will print </p>
  
  <p>Commment =  (attributeValueIdDataObj){
               name = "Owner changed because of default owner assignment specified in the component map"
            }</p>
  
  <p>So it looks like it IS an attributeValueIdDataObj and DOES have a name attribute.</p>
  
  <p>I used the suds DEBUG logging and the XML return elements look exactly the same regardless of what the attribute.attributeDefinitionId.name is.</p>
  
  <p>I have no idea how it changes into a 'Text' object when trying to access the name attribute</p>
  
  <p>Any ideas?</p>