title: Getting ERRORS while Creating a new Defect in Rally using python
body: <p>Following is my code to add new defect to rally using python:</p>
  
  <pre><code>import sys import time from pyral import Rally, rallyWorkset
  server = "rally1.rallydev.com" 
  user = "*****" 
  password = "****" 
  apikey = "****" 
  workspace = "****" 
  project = "****"
  rally = Rally(server, user=user, password=password,apikey=apikey, workspace=workspace, project=project)
  
  project_req = rally.get('Project', fetch=True, query='Name = "%s"' % (project))
  project = project_req.next()
  
  priority = "3.Normal" 
  severity = "Major Problem" 
  name = "prabhakar.sharma@***.com"
  #defectID = 'INC0547865'
  description = "A Test Rally User Story created using python API now, start working on it as fast as you all could !!" 
  user = rally.getUserInfo(username=name).pop(0)
  #rally.setProject(proj) 
  print("%s %s "% (project.oid , user.ref)) 
  defect_data = { "Project" : project.ref,
                  "SubmittedBy" : user.ref,
                  "Name" : name,
                  "Severity" : severity, 
                  "Priority" : priority,
                 "State" : "Open", 
                  "ScheduleState" : "Defined",
                  "Owner": user.ref,
                  "Description" : description 
                  }
  
  
  defect = rally.create('Defect', defect_data) print("Defect created, ObjectID: %s  FormattedID: %s" % (defect.oid, defect.FormattedID))
  </code></pre>
  
  <p>Traceback:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):   File "pythonrally.py", line 186,
    in 
        defect = rally.create('Defect', defect_data)   File "C:\Users\PRABHAKAR.SHARMA\AppData\Local\Programs\Python\Python37\pyral\restapi.py",
    line 1024, in put
        raise RallyRESTAPIError(problem) pyral.restapi.RallyRESTAPIError: 422 Validation error: Defect.PRJ# should not be null</p>
  </blockquote>