Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 594 by buggood: RobotFramework 2.5 does not support encoding "c", which is default for some platforms
http://code.google.com/p/robotframework/issues/detail?id=594


Robot Framework throws an exception at runtime when encoding "C" is set on the machine (LANG=C)


Following is a stack trace:

File "workspace/target/robotframework-2.5/robot/runner.py", line 307, in <module>
   robot.run_from_cli(sys.argv[1:], __doc__)
File "workspace/target/robotframework-2.5/robot/__init__.py", line 39, in run_from_cli
   _run_or_rebot_from_cli(run, args, usage, pythonpath='pythonpath')
File "workspace/target/robotframework-2.5/robot/__init__.py", line 69, in _run_or_rebot_from_cli
   _exit(FRAMEWORK_ERROR, 'Unexpected error: %s' % error, details)
File "workspace/target/robotframework-2.5/robot/__init__.py", line 159, in _exit
   LOGGER.error(message)
File "workspace/target/robotframework-2.5/robot/output/loggerhelper.py", line 55, in error
   self.write(msg, 'ERROR')
File "workspace/target/robotframework-2.5/robot/output/loggerhelper.py", line 58, in write
   self.message(Message(message, level, html))
File "workspace/target/robotframework-2.5/robot/output/logger.py", line 94, in message
   logger.message(msg)
File "workspace/target/robotframework-2.5/robot/output/monitor.py", line 69, in message
   self._write(message, stream=sys.stderr)
File "workspace/target/robotframework-2.5/robot/output/monitor.py", line 74, in _write
   stream.write(utils.encode_output(message).replace('\t', ' '*8))
File "workspace/target/robotframework-2.5/robot/utils/encoding.py", line 29, in encode_output
   return string.encode(_output_encoding, errors)
LookupError: unknown encoding 'c'

To reproduce:
1. export LANG=C
2. run robot tests

Note: if LANG environment variable is unset, problem is not reproduced

Details on robot version:
Robot Framework 2.5 (Python 2.6.1 on darwin)



Reply via email to