Advertisement
Guest User

Untitled

a guest
May 11th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. class Change(Base):
  2. __table__ = 'change_request.do'
  3.  
  4. # Fetch changes updated on the last 5 minutes
  5. changes = chg.last_updated(minutes=5)
  6. #print changes client side script.
  7.  
  8. for eachline in changes:
  9. print eachline
  10.  
  11. Traceback (most recent call last):
  12. File "C:Python27libsite-packagesSOAPpyParser.py", line 1080, in _parseSOAP
  13. parser.parse(inpsrc)
  14. File "C:Python27Libxmlsaxexpatreader.py", line 107, in parse
  15. xmlreader.IncrementalParser.parse(self, source)
  16. File "C:Python27Libxmlsaxxmlreader.py", line 125, in parse
  17. self.close()
  18. File "C:Python27Libxmlsaxexpatreader.py", line 220, in close
  19. self.feed("", isFinal = 1)
  20. File "C:Python27Libxmlsaxexpatreader.py", line 214, in feed
  21. self._err_handler.fatalError(exc)
  22. File "C:Python27Libxmlsaxhandler.py", line 38, in fatalError
  23. raise exception
  24. SAXParseException: <unknown>:1:0: no element found
  25.  
  26. from servicenow import ServiceNow
  27. from servicenow import Connection
  28. from servicenow.drivers import SOAP
  29.  
  30. # For SOAP connection
  31. conn = SOAP.Auth(username='abc', password='def', instance='test')
  32.  
  33. rpt = ServiceNow.Base(conn)
  34. rpt.__table__ = "sys_report_template.do?CSV"
  35.  
  36. #jvar_report_id replaced with .... to protect confidentiality
  37. report = rpt.fetch_one({'jvar_report_id': '92a6760a......aas'})
  38.  
  39. for eachline in report:
  40. print eachline
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement