MarketSquare / MarketSquare/robotframework-httprequestlibrary

TRACE level logging throws error in some cases

Open
#66 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
21
Forks
12
PR merge metrics
No merged PRs in 30d

Description

If setting logging level to TRACE (just minimum level is enough, not need to be shown level), some tests fail with error Cannot create PyString with non-byte value. This happens e.g. at Acceptance.Get.Get Requests.

This is probably some Jython issue, as there's no calls related to that in the library's code or in the stacktrace.

Run: mvn clean verify -Dtests="Get Requests" -DrobotLogLevel=TRACE
Stacktrace:

java.lang.IllegalArgumentException: 
	at jdk.internal.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at pprint$py.pformat$10(C:/Users/hifi/git/robotframework/build/Lib/pprint.py:120)
	at pprint$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/pprint.py)
	at robot.utils.unic$py.prepr$6(C:/Users/hifi/git/robotframework/build/Lib/robot/utils/unic.py:70)
	at robot.utils.unic$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/utils/unic.py)
	at robot.variables.assigner$py.f$18(C:/Users/hifi/git/robotframework/build/Lib/robot/variables/assigner.py:109)
	at robot.variables.assigner$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/variables/assigner.py)
	at robot.output.loggerhelper$py.resolve_delayed_message$18(C:/Users/hifi/git/robotframework/build/Lib/robot/output/loggerhelper.py:106)
	at robot.output.loggerhelper$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/output/loggerhelper.py)
	at robot.output.loggerhelper$py.message$16(C:/Users/hifi/git/robotframework/build/Lib/robot/output/loggerhelper.py:98)
	at robot.output.loggerhelper$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/output/loggerhelper.py)
	at robot.output.xmllogger$py._write_message$8(C:/Users/hifi/git/robotframework/build/Lib/robot/output/xmllogger.py:63)
	at robot.output.xmllogger$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/output/xmllogger.py)
	at robot.output.xmllogger$py.log_message$7(C:/Users/hifi/git/robotframework/build/Lib/robot/output/xmllogger.py:57)
	at robot.output.xmllogger$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/output/xmllogger.py)
	at robot.output.logger$py._log_message$23(C:/Users/hifi/git/robotframework/build/Lib/robot/output/logger.py:184)
	at robot.output.logger$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/output/logger.py)
	at robot.output.output$py.message$12(C:/Users/hifi/git/robotframework/build/Lib/robot/output/output.py:69)
	at robot.output.output$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/output/output.py)
	at robot.output.loggerhelper$py.write$10(C:/Users/hifi/git/robotframework/build/Lib/robot/output/loggerhelper.py:63)
	at robot.output.loggerhelper$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/output/loggerhelper.py)
	at robot.output.loggerhelper$py.trace$4(C:/Users/hifi/git/robotframework/build/Lib/robot/output/loggerhelper.py:41)
	at robot.output.loggerhelper$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/output/loggerhelper.py)
	at robot.variables.assigner$py.assign$17(C:/Users/hifi/git/robotframework/build/Lib/robot/variables/assigner.py:111)
	at robot.variables.assigner$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/variables/assigner.py)
	at robot.model.testcase$py.visit$8(C:/Users/hifi/git/robotframework/build/Lib/robot/model/testcase.py:78)
	at robot.model.testcase$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/model/testcase.py)
	at robot.model.itemlist$py.visit$12(C:/Users/hifi/git/robotframework/build/Lib/robot/model/itemlist.py:76)
	at robot.model.itemlist$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/model/itemlist.py)
	at robot.model.visitor$py.visit_suite$2(C:/Users/hifi/git/robotframework/build/Lib/robot/model/visitor.py:89)
	at robot.model.visitor$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/model/visitor.py)
	at robot.model.testsuite$py.visit$21(C:/Users/hifi/git/robotframework/build/Lib/robot/model/testsuite.py:174)
	at robot.model.testsuite$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/model/testsuite.py)
	at robot.model.itemlist$py.visit$12(C:/Users/hifi/git/robotframework/build/Lib/robot/model/itemlist.py:76)
	at robot.model.itemlist$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/model/itemlist.py)
	at robot.model.visitor$py.visit_suite$2(C:/Users/hifi/git/robotframework/build/Lib/robot/model/visitor.py:89)
	at robot.model.visitor$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/model/visitor.py)
	at robot.model.testsuite$py.visit$21(C:/Users/hifi/git/robotframework/build/Lib/robot/model/testsuite.py:174)
	at robot.model.testsuite$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/model/testsuite.py)
	at robot.run$py.main$3(C:/Users/hifi/git/robotframework/build/Lib/robot/run.py:452)
	at robot.run$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/run.py)
	at robot.utils.application$py._execute$10(C:/Users/hifi/git/robotframework/build/Lib/robot/utils/application.py:94)
	at robot.utils.application$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/utils/application.py)
	at robot.utils.application$py.execute_cli$5(C:/Users/hifi/git/robotframework/build/Lib/robot/utils/application.py:49)
	at robot.utils.application$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/utils/application.py)
	at robot.run$py.run_cli$7(C:/Users/hifi/git/robotframework/build/Lib/robot/run.py:492)
	at robot.run$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/run.py)
	at robot.jarrunner$py._run$3(C:/Users/hifi/git/robotframework/build/Lib/robot/jarrunner.py:67)
	at robot.jarrunner$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/jarrunner.py)
	at robot.jarrunner$py.run$2(C:/Users/hifi/git/robotframework/build/Lib/robot/jarrunner.py:60)
	at robot.jarrunner$py.call_function(C:/Users/hifi/git/robotframework/build/Lib/robot/jarrunner.py)
	at org.robotframework.RobotRunner.run(RobotRunner.java:77)
	at org.robotframework.RobotFramework.run(RobotFramework.java:61)
	at org.robotframework.mavenplugin.AcceptanceTestMojo.executeRobot(AcceptanceTestMojo.java:73)
	at org.robotframework.mavenplugin.AcceptanceTestMojo.subclassExecute(AcceptanceTestMojo.java:68)
	at org.robotframework.mavenplugin.AbstractMojoWithLoadedClasspath.execute(AbstractMojoWithLoadedClasspath.java:53)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Error is content specific, as only that test (of get tests) seem to be failing because of it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run mvn clean verify -Dtests="Get Requests" -DrobotLogLevel=TRACE and reproduce the failure in Acceptance.Get.Get Requests. Start with the stack-trace entry points robot/output/loggerhelper.py, robot/variables/assigner.py, and pprint.py, then compare TRACE behavior with lower levels. Done means the test completes without the Cannot create PyString with non-byte value error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, python
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.