Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8304345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:49:22+00:00 2026-06-08T17:49:22+00:00

I am using the Python Toolkit for Rally REST API to update defects on

  • 0

I am using the Python Toolkit for Rally REST API to update defects on our Rally server. I have confirmed that I am able to make contact with the server and authenticate fine by getting a list of current defects. I am running into issues with updating them. I am using Python 2.7.3 with pyral 0.9.1 and requests 0.13.3.

Also, I am passing ‘verify=False’ to the Rally() call and have made appropriate chages to the
restapi module to compensate for this.

Here is my test code:

import sys
from pyral import Rally, rallySettings

server = "rallydev.server1.com"
user = "user@mycompany.com"
password = "trial"
workspace = "trialWorkspace"
project = "Testing Project"
defectID = "DE192"

rally = Rally(server, user, password, workspace=workspace,
              project=project,     verify=False)
defect_data = { "FormattedID" : defectID,
                "State"       : "Closed"
              }
try:
    defect = rally.update('Defect', defect_data)
except Exception, details:
    sys.stderr.write('ERROR: %s \n' % details)
    sys.exit(1)

print "Defect %s updated" % defect.FormattedID

When I run the script:

[temp]$ ./updefect.py  
ERROR: Unable to update the Defect  

If I change the code in the RallyRESTResponse function to print out the value of self.errors when found (line 164 of rallyresp.py), I get this output:

[temp]$ ./updefect.py   
[u"Cannot parse input stream due to I/O error as JSON document: Parse error: expected '{' but saw '\uffff' [ chars read = >>>\uffff<<< ]"]  
ERROR: Unable to update the Defect  

I did find another question that sounds like it might possibly be related to mine here:
App SDK: Erorr parsing input stream when running query

Can you provide any assistance?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:49:23+00:00Added an answer on June 8, 2026 at 5:49 pm

    Pairing Michael’s observation regarding the GZIP encoding with that of another astute Rally customer working a Support case on the issue – it appears that some versions of the requests module will default to GZIP compression if the content-type is not specifically defined.

    The fix is to set content-type to application/json in the REST Headers section of pyral’s config.py:

    RALLY_REST_HEADERS = \
    {
      'X-RallyIntegrationName'     : 'Python toolkit for Rally REST API',
      'X-RallyIntegrationVendor'   : 'Rally Software Development', 
      'X-RallyIntegrationVersion'  :       '%s.%s.%s' % __version__,
      'X-RallyIntegrationLibrary'  : 'pyral-%s.%s.%s' % __version__,
      'X-RallyIntegrationPlatform' : 'Python %s' % platform.python_version(),
      'X-RallyIntegrationOS'       : platform.platform(),
      'User-Agent'                 : 'Pyral Rally WebServices Agent',
      'Content-Type'               : 'application/json',
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Python v2.x, I have 3 variables that I want to ask the user
I'm using Python with the NLTK toolkit in Apache via CGI. The toolkit need
Using Python 2.6 I want to be able to convert numbers such as 00000,
Using Python I want to create a symbolic link pointing to a path that
It seems I can communicate with Salesforce Metadata API just using SOAP python client
using python 2.6.5 and python-ldap 2.3.10, I have the following problem: Under certain circumstances
Using Python v2, I have the user entering an amount into a string as
Using Python v2, I have the following code: print (Total of the sale is:
I have been trying to make the NLTK (Natural Language Toolkit) work on the
Using Python I want to be able to draw text at different angles using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.