Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

unable to copy file to server via python, manually it works

On one of our users machine copying file to server is unable via python:

shutil.copyfile(filepth, new_file)

returns IOError: [Errno 22] Invalid argument as if there are no rights for the user. Server is connected via OpenVPN as all other users do. Connection is good. The user can put files manually to this server. OS is Windows 10, I tried also to disable Windows Firewall and to install all Windows updates but nothing helps. What works:

  1. copying files manually

  2. copying them via cmd like

    C:UsersLaney>copy \space2fixies4OUTANIMATIONSmayamovieep177animationep177_sc027.mov \space2fixies4OUTANIMATIONSmayamovieep177animationarchiveep177_sc027.prev.11.mov

  3. copying via python (shutil, subprocess, os.system) files locally, not to the server

What does not work: any python operation (shutil, subprocess, os.system) similar to cmd copy

Any ideas? Thanks in advance


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...