Closed
Bug 1200409
Opened 9 years ago
Closed 9 years ago
|marionette --help| causes stack trace: "unsupported format character 'p'"
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox43 fixed)
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: erahm, Assigned: parkouss)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
ato
:
review+
|
Details | Diff | Splinter Review |
When trying to print the usage for the |marionette| command I get the following stack trace:
> $ marionette --help
> Traceback (most recent call last):
> File "/home/erahm/dev/areweslimyet/marionette-env/bin/marionette", line 9, in <module>
> load_entry_point('marionette-client==0.19', 'console_scripts', 'marionette')()
> File "/home/erahm/dev/areweslimyet/marionette-env/local/lib/python2.7/site-packages/marionette/runtests.py", line 51, in cli
> args = parser.parse_args()
> File "/home/erahm/dev/areweslimyet/marionette-env/local/lib/python2.7/site-packages/marionette/runner/base.py", line 395, in parse_args
> args = ArgumentParser.parse_args(self, args, values)
> File "/usr/lib/python2.7/argparse.py", line 1690, in parse_args
> args, argv = self.parse_known_args(args, namespace)
> File "/usr/lib/python2.7/argparse.py", line 1722, in parse_known_args
> namespace, args = self._parse_known_args(args, namespace)
> File "/usr/lib/python2.7/argparse.py", line 1928, in _parse_known_args
> start_index = consume_optional(start_index)
> File "/usr/lib/python2.7/argparse.py", line 1868, in consume_optional
> take_action(action, args, option_string)
> File "/usr/lib/python2.7/argparse.py", line 1796, in take_action
> action(self, namespace, argument_values, option_string)
> File "/usr/lib/python2.7/argparse.py", line 996, in __call__
> parser.print_help()
> File "/usr/lib/python2.7/argparse.py", line 2329, in print_help
> self._print_message(self.format_help(), file)
> File "/usr/lib/python2.7/argparse.py", line 2303, in format_help
> return formatter.format_help()
> File "/usr/lib/python2.7/argparse.py", line 281, in format_help
> help = self._root_section.format_help()
> File "/usr/lib/python2.7/argparse.py", line 211, in format_help
> func(*args)
> File "/usr/lib/python2.7/argparse.py", line 298, in _format_usage
> usage = usage % dict(prog=self._prog)
> ValueError: unsupported format character 'p' (0x70) at index 1
Version info:
> $ marionette --version
> %prog 0.19 (using marionette-driver: 0.13, marionette-transport: 0.7)
Reporter | ||
Comment 1•9 years ago
|
||
This appears to be because of the use of '%prog'. Perhaps there's a missing substitution going on?
Comment 2•9 years ago
|
||
I assume somewhat a regression from Juliens work on bug 1183157?
Flags: needinfo?(j.parkouss)
Assignee | ||
Comment 3•9 years ago
|
||
Right - not sure how I did that though. :)
Working on a fix right now.
Flags: needinfo?(j.parkouss)
Assignee | ||
Comment 4•9 years ago
|
||
I can confirm the bug. The attached patch fixes it for me, and now I can run with success:
- marionette --help
- marionette --version
Assignee | ||
Comment 5•9 years ago
|
||
Sorry I attached the wrong patch.
Attachment #8655311 -
Attachment is obsolete: true
Attachment #8655311 -
Flags: review?(ato)
Attachment #8655312 -
Flags: review?(ato)
Updated•9 years ago
|
Blocks: 1183157
Keywords: regression
Comment 6•9 years ago
|
||
Comment on attachment 8655312 [details] [diff] [review]
1200409.patch
Review of attachment 8655312 [details] [diff] [review]:
-----------------------------------------------------------------
Please consider using mozreview next time.
Attachment #8655312 -
Flags: review?(ato) → review+
Comment 8•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Comment 9•9 years ago
|
||
This is not only --help but nearly everything. This makes 0.19 unusable for me. Julien, we should release a new version of marionette client.
Blocks: 1198889
Summary: |marionette --help| causes stack trace → marionette CLI causes stack trace: "unsupported format character 'p'"
Comment 10•9 years ago
|
||
So actually this bug appeared because of the underlying changes from optparse to argparse on bug 1163801. While optparse supports %prog it's not supported in argparse.
What I wonder why the Marionette unit tests were not broken due to this problem.
Comment 11•9 years ago
|
||
Not sure what exactly went wrong with my local environment but re-creating it fixes the issue for me. So this is indeed only the --help argument which is affected. Julien already raised bug 1201036 for the release, but we might want to wait until someone complains or we would have another release anyway.
Summary: marionette CLI causes stack trace: "unsupported format character 'p'" → |marionette --help| causes stack trace: "unsupported format character 'p'"
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•