Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CLI: Reading values from files does not support binary files #2752

Closed
Labels
@JohnVillalovos

Description

@JohnVillalovos

When using the@ prefix to specify a file that should be read, it will read the file as "utf-8" text. This fails with binary files such as a PNG.

This was discussed in#2751 as pointed out by@trafford-tbe

Code is:

ifisinstance(v,str)andv.startswith("@"):
# If the user-provided value starts with @, we try to read the file
# path provided after @ as the real value. Exit on any error.
try:
withopen(v[1:],encoding="utf-8")asf:
returnf.read()
exceptExceptionase:
sys.stderr.write(f"{e}\n")
sys.exit(1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp