TypeError traceback running borgmatic transfer #663

Closed
opened 2023-03-31 05:20:46 +00:00 by witten · 1 comment
Owner

What I'm trying to do and why

I'm trying to run borgmatic transfer as part of testing and development, but I get a TypeError when I do.

Steps to reproduce (if a bug)

borgmatic transfer --source-repository 1.2.borg

Actual behavior

Traceback (most recent call last):
  File "/usr/bin/borgmatic", line 33, in <module>
    sys.exit(load_entry_point('borgmatic', 'console_scripts', 'borgmatic')())
  File "/home/witten/code/borgmatic/borgmatic/commands/borgmatic.py", line 712, in main
    summary_logs = parse_logs + list(collect_configuration_run_summary_logs(configs, arguments))
  File "/home/witten/code/borgmatic/borgmatic/commands/borgmatic.py", line 607, in collect_configuration_run_summary_logs
    results = list(run_configuration(config_filename, config, arguments))
  File "/home/witten/code/borgmatic/borgmatic/commands/borgmatic.py", line 116, in run_configuration
    yield from run_actions(
  File "/home/witten/code/borgmatic/borgmatic/commands/borgmatic.py", line 293, in run_actions
    borgmatic.actions.transfer.run_transfer(
  File "/home/witten/code/borgmatic/borgmatic/actions/transfer.py", line 21, in run_transfer
    borgmatic.borg.transfer.transfer_archives(
  File "/home/witten/code/borgmatic/borgmatic/borg/transfer.py", line 46, in transfer_archives
    return execute_command(
  File "/home/witten/code/borgmatic/borgmatic/execute.py", line 216, in execute_command
    log_command(full_command, input_file, output_file)
  File "/home/witten/code/borgmatic/borgmatic/execute.py", line 180, in log_command
    ' '.join(full_command)
TypeError: sequence item 4: expected str instance, dict found

Expected behavior

No traceback and the borgmatic invokes Borg to initiate the transfer of archives.

Other notes / implementation ideas

I'm pretty sure this is a accidental regression as part of #635; the transfer action is not getting its repository dict converted to a repository path string.

Environment

borgmatic version: master (after 1.7.10)

borgmatic installation method: pip install --editable

Borg version: 1.2.3

Python version: 3.10.9

operating system and version: Manjaro Linux stable

#### What I'm trying to do and why I'm trying to run `borgmatic transfer` as part of testing and development, but I get a `TypeError` when I do. #### Steps to reproduce (if a bug) ```bash borgmatic transfer --source-repository 1.2.borg ``` #### Actual behavior ```bash Traceback (most recent call last): File "/usr/bin/borgmatic", line 33, in <module> sys.exit(load_entry_point('borgmatic', 'console_scripts', 'borgmatic')()) File "/home/witten/code/borgmatic/borgmatic/commands/borgmatic.py", line 712, in main summary_logs = parse_logs + list(collect_configuration_run_summary_logs(configs, arguments)) File "/home/witten/code/borgmatic/borgmatic/commands/borgmatic.py", line 607, in collect_configuration_run_summary_logs results = list(run_configuration(config_filename, config, arguments)) File "/home/witten/code/borgmatic/borgmatic/commands/borgmatic.py", line 116, in run_configuration yield from run_actions( File "/home/witten/code/borgmatic/borgmatic/commands/borgmatic.py", line 293, in run_actions borgmatic.actions.transfer.run_transfer( File "/home/witten/code/borgmatic/borgmatic/actions/transfer.py", line 21, in run_transfer borgmatic.borg.transfer.transfer_archives( File "/home/witten/code/borgmatic/borgmatic/borg/transfer.py", line 46, in transfer_archives return execute_command( File "/home/witten/code/borgmatic/borgmatic/execute.py", line 216, in execute_command log_command(full_command, input_file, output_file) File "/home/witten/code/borgmatic/borgmatic/execute.py", line 180, in log_command ' '.join(full_command) TypeError: sequence item 4: expected str instance, dict found ``` #### Expected behavior No traceback and the borgmatic invokes Borg to initiate the transfer of archives. #### Other notes / implementation ideas I'm pretty sure this is a accidental regression as part of #635; the `transfer` action is not getting its `repository` dict converted to a repository path string. #### Environment **borgmatic version:** master (after 1.7.10) **borgmatic installation method:** `pip install --editable` **Borg version:** 1.2.3 **Python version:** 3.10.9 **operating system and version:** Manjaro Linux stable
witten added the
bug
label 2023-03-31 05:20:53 +00:00
Author
Owner

Fixed in master. An end-to-end test for borgmatic transfer would be ideal, but that would require having a Borg 2 beta in the end-to-end test images.

Fixed in master. An end-to-end test for `borgmatic transfer` would be ideal, but that would require having a Borg 2 beta in the end-to-end test images.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#663
No description provided.