Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No module named cassandra in Jython Evaluator

How to install and configure any extra python module to use it in Jython Evaluator? Will pip install work? And how to set the path so that it will be picked while running the particular module code?

No module named cassandra in Jython Evaluator

How to install and configure any extra python module to use it in Jython Evaluator? Will pip install work? And how to set the path so that it will be picked Validation error: SCRIPTING_08 - Script error while running the particular module code?init script: javax.script.ScriptException: cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers', {'10.175.132.252': ConnectionShutdown('Connection to 10.175.132.252 was closed',)}) in <script> at line number 16 : initScript

import sys sys.path.insert(0,'/usr/lib/python2.7/site-packages') from cassandra.cluster import Cluster from cassandra.auth import PlainTextAuthProvider auth_provider = PlainTextAuthProvider(username='XXX', password='XXXXX') try: session=Cluster(['10.XXX.XXX.XXX'],auth_provider=auth_provider).connect() rows = session.execute('select distinct version,site,report_date from sample.test_table') except Exception as e: raise e version = [row.version for row in rows]
session.shutdown()