python 2.7 - "xml.sax._exceptions.SAXReaderNotAvailable: No parsers found" when run in jenkins -


so i'm working towards having automated staging deployments via jenkins , ansible. part of using script called ec2.py ansible in order dynamically retrieve list of matching servers deploy to.

ssh-ing jenkins server , running script jenkins user, script runs expected. however, running script within jenkins leads following error:

error: inventory script (ec2/ec2.py) had execution error: traceback (most recent call last): file "/opt/bitnami/apps/jenkins/jenkins_home/jobs/deploy api/workspace/deploy/ec2/ec2.py", line 1262, in <module> ec2inventory() file "/opt/bitnami/apps/jenkins/jenkins_home/jobs/deploy api/workspace/deploy/ec2/ec2.py", line 159, in __init__ self.do_api_calls_update_cache() file "/opt/bitnami/apps/jenkins/jenkins_home/jobs/deploy api/workspace/deploy/ec2/ec2.py", line 386, in do_api_calls_update_cache self.get_instances_by_region(region) file "/opt/bitnami/apps/jenkins/jenkins_home/jobs/deploy api/workspace/deploy/ec2/ec2.py", line 417, in get_instances_by_region reservations.extend(conn.get_all_instances(filters = { filter_key : filter_values })) file "/opt/bitnami/apps/jenkins/jenkins_home/jobs/deploy api/workspace/deploy/.local/lib/python2.7/site-packages/boto/ec2/connection.py", line 585, in get_all_instances max_results=max_results) file "/opt/bitnami/apps/jenkins/jenkins_home/jobs/deploy api/workspace/deploy/.local/lib/python2.7/site-packages/boto/ec2/connection.py", line 681, in get_all_reservations [('item', reservation)], verb='post') file "/opt/bitnami/apps/jenkins/jenkins_home/jobs/deploy api/workspace/deploy/.local/lib/python2.7/site-packages/boto/connection.py", line 1181, in get_list xml.sax.parsestring(body, h) file "/usr/lib/python2.7/xml/sax/__init__.py", line 43, in parsestring parser = make_parser() file "/usr/lib/python2.7/xml/sax/__init__.py", line 93, in make_parser raise saxreadernotavailable("no parsers found", none) xml.sax._exceptions.saxreadernotavailable: no parsers found 

i don't know python, i'm not sure how debug issue further.

so turns out issue jenkins overwriting default ld_library_path variable. unsetting variable before running python, able make python app work!


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -