Skip to content

Self-check fails when backing up encrypted message #73

@penn5

Description

@penn5

If you're backing up a symmetric encrypted message, the decryption detects -----BEGIN PGP MESSAGE----- and tries to decrypt it, but it doesn't know the password so it fails with an obscure error during self-check.
Putting --no-encrypt into the self-check arguments (when appropriate )should sort this out.

Traceback (most recent call last):
  File "/usr/local/bin/qr-backup", line 1895, in <module>
    main_restore(args[1:])
    ~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/local/bin/qr-backup", line 1851, in main_restore
    content = do_restore(codes, totals, use_compression=use_compression, use_encryption=use_encryption, encryption_passphrase=encryption_passphrase, use_erasure=use_erasure)
  File "/usr/local/bin/qr-backup", line 1650, in do_restore
    content = decrypt(content, encryption_passphrase)
  File "/usr/local/bin/qr-backup", line 809, in decrypt
    result = subprocess.run(command, capture_output=True, input=content_bytes)
  File "/usr/lib64/python3.13/subprocess.py", line 554, in run
    with Popen(*popenargs, **kwargs) as process:
         ~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/subprocess.py", line 1039, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        pass_fds, cwd, env,
                        ^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
                        gid, gids, uid, umask,
                        ^^^^^^^^^^^^^^^^^^^^^^
                        start_new_session, process_group)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/subprocess.py", line 1899, in _execute_child
    self.pid = _fork_exec(
               ~~~~~~~~~~^
            args, executable_list,
            ^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
            process_group, gid, gids, uid, umask,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            preexec_fn, _USE_VFORK)
            ^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not NoneType

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions