Skip to content

Malformed String Error #40

@DavidAmison

Description

@DavidAmison

When running the following:

sle2docker activate <IMAGE>

The following error message is received:

/usr/lib64/ruby/gems/2.1.0/gems/sle2docker-0.5.2/bin/sle2docker:16:in `printf': malformed format string - %F (ArgumentError)
    from /usr/lib64/ruby/gems/2.1.0/gems/sle2docker-0.5.2/bin/sle2docker:16:in `rescue in <top (required)>'
    from /usr/lib64/ruby/gems/2.1.0/gems/sle2docker-0.5.2/bin/sle2docker:4:in `<top (required)>'
    from /usr/bin/sle2docker:23:in `load'
    from /usr/bin/sle2docker:23:in `<main>'

A little messing around locally points the finder here at line 16 of sle2docker:

$stderr.printf(e.message + "\n")

With some debugging showing the problem is that the error message contains % characters. A quick modification to the following fixed the issue locally:

msg = e.message.gsub! '%', '%%'
$stderr.printf(msg + "\n")

Note that this specific issue was actually a result of not running the command as sudo with a complaint about being unable to connect to the docker engine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions