Skip to content

BUG: SSH file copy error on Windows 10 #699

@reffum

Description

@reffum

The ProcessExecutionError is raised when trying to copy file or write data over SSH.

Windows 10 22H2
Python3.12
plumbum v1.9.0

I found what 2 reasons of this error:

  • plumbum/machines/remote.py:436. In python3.12 in NamedTemporaryFile() was added new parameter delete_on_close=True.This cause an error in this case.
  • plumbum use slash file path format(e.g: /C/Users/GAVRIL~1.S/AppData/Local/Temp/tmpon7h29zf). But Windows scp command fail with this path. See error.log for detail.

I try to fix this error as write in fix.path. After this fix it copy and write files successfully.

Apply:

  • plumbum_test.py.txt test with this bugs
  • error.log
  • fix.patch patch fix this bug

fix.patch
plumbum_test.py.txt
error.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions