Open marekjagielski opened 8 years ago
Ok, I see that with jython I have a java class generated for each python file. So next to parser.py there is parser$py.class. When I restart JMeter, problably jython interpreter start to use cached class. If I extract a substring in the module_name, it works:
try: module_name = os.path.splitext(os.path.split(__file__)[1])[0] except: module_name = __name__ module_name = module_name[0:module_name.find("$")] parsing_table_module = '_'.join([module_name, start_symbol, 'parsetab'])
Is it possible to be official solution to be able to use python-jsonpath-rw with Jython?
Hi, I started to use your module inside jython scrips in JMeter tests. I use jmeter-maven-plugin.
To be able to use your module, I download jsonpath code as well as other dependencies and put i inside Lib folder where all jython libs are:
It seems to work. However, I get an error in JMeter logs:
I see in parser.py code that:
parsing_table_module = '_'.join([module_name, start_symbol, 'parsetab'])
and after in yacc.py code it is used:
exec('import %s' % module)
Jsonpath I am using is:
parse('*.Error.Validator').find(response)
What is wrong?
Thanks in advance for any help. Anyway the library seems great and it fits well in JMeter JSON tests.