Menu

#1 error in decoding json

open
None
7
2012-02-08
2012-02-08
Guido Serra
No

I rolled back to the old json decode implementation and...
http://http-qat.svn.sourceforge.net/viewvc/http-qat/framework/trunk/src/com/vodafone/qa/common/functions.py?r1=12&r2=35

Traceback (most recent call last):
File "src/test.py", line 66, in <module>
failed_test_case_name = executor.run_chain(chain, locale_id)
File "/Users/zeph/tmp/http-qat/src/com/vodafone/qa/common/testexecutor.py", line 94, in run_chain
successful = self.wrap_run_test(test_run)
File "/Users/zeph/tmp/http-qat/src/com/vodafone/qa/common/standalone.py", line 94, in wrap_run_test
return self.run_test(test_run)
File "/Users/zeph/tmp/http-qat/src/com/vodafone/qa/common/testexecutor.py", line 153, in run_test
successful = successful and self.validate_response(test_run, url_name, response)
File "/Users/zeph/tmp/http-qat/src/com/vodafone/qa/common/standalone.py", line 97, in validate_response
return test_run.validate_response(url_name, response)
File "/Users/zeph/tmp/http-qat/src/com/vodafone/qa/common/testruns.py", line 338, in validate_response
self.vars[url_name][var_name] = self.__var_eval(var_info.value, var_name, url_name)
File "/Users/zeph/tmp/http-qat/src/com/vodafone/qa/common/testruns.py", line 338, in validate_response
self.vars[url_name][var_name] = self.__var_eval(var_info.value, var_name, url_name)
File "/Users/zeph/tmp/http-qat/src/com/vodafone/qa/common/testruns.py", line 330, in _TestRun__var_eval
return eval(value)
File "<string>", line 1, in <module>
File "/Users/zeph/tmp/http-qat/src/com/vodafone/qa/common/functions.py", line 204, in f_json_decode
return coder.decode(s)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyList(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyObject(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyDictionary(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyObject(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyList(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyObject(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyDictionary(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyObject(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyList(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyObject(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.toPyDictionary(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONDecoderImpl.decode(Unknown Source)
at com.vodafone.qa.common.json.impl.PyJSONCoderImpl.decode(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

java.lang.NoSuchMethodError: java.lang.NoSuchMethodError: org.python.core.PyList.<init>(Ljava/util/Vector;)V

Discussion

  • Guido Serra

    Guido Serra - 2012-02-08
    • assigned_to: nobody --> zeph1ro
     
  • Guido Serra

    Guido Serra - 2012-02-08

    the one, using the eval() was giving back:

    Error for test case similar-books (url: url ): Exception e: name 'null' is not defined

    It can be an issue of the JSON format, cause it doesn't happen on all tests

     

Log in to post a comment.

MongoDB Logo MongoDB