Posted on 05-21-2013 08:46 AM
Hello,
So we are trying to run this python computer exporter the xml one. After we run it, it gets to about 700 machines and we get this error.
COMPUTER:JSS Computer Exporter (Python) USER$ ./compexport_xml.py
JSS Computer Exporter
JSS Address: 127.0.0.1
JSS User: JSSRead
JSS Password:
CSV File: /Users/USER/Documents/jssexporter/export.cvs
Collecting data for 2130 computer(s)...
Collected 42 computers
Collected 84 computers
Collected 126 computers
Collected 168 computers
Collected 210 computers
Collected 252 computers
Collected 294 computers
Collected 336 computers
Collected 378 computers
Collected 420 computers
Collected 462 computers
Collected 504 computers
Collected 546 computers
Collected 588 computers
Collected 630 computers
Collected 672 computers
Traceback (most recent call last):
File "./compexport_xml.py", line 400, in <module>
main()
File "./compexport_xml.py", line 115, in main
grabComputerData(jssAddr, jssUser, jssPass, csvPath)
File "./compexport_xml.py", line 139, in grabComputerData
grabber.parseXML(url, csvPath, CasperComputerListHandler(grabber, url, csvPath))
File "./compexport_xml.py", line 161, in parseXML
parser.parse(compList)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 304, in end_element
File "./compexport_xml.py", line 188, in endElement
self.grabber.parseXML(self.url + "/id/" + id, self.csvPath, self.handler)
File "./compexport_xml.py", line 161, in parseXML
parser.parse(compList)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 304, in end_element
File "./compexport_xml.py", line 218, in endElement
self.csvWriter.writeCSVLine()
File "./compexport_xml.py", line 373, in writeCSVLine
self.processorType, self.processorArchitecture, self.totalRAM, self.storageSize))
UnicodeEncodeError: 'ascii' codec can't encode character u'u2019' in position 26: ordinal not in range(128)
It would be greatly appreciated...