Python shutil copy to network folder OSError: [Errno 22] Invalid argument:

Python shutil copy to network folder OSError: [Errno 22] Invalid argument:

我正在使用shutil.copy复制远程网络服务器中的文件

shutil.copy(r'ebw.json', r'\xx.xx.xx.xx\ebw.json')

我收到以下错误

Traceback (most recent call last):
  File "D:\ebw.py", line 93, in <module>
    shutil.copyfile(os.path.join(r'bwe.json'), os.path.join(r'\xx.xx.xx.xx\ebw.json'))
  File "C:\Program Files (x86)\Python38-32\lib\shutil.py", line 261, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
OSError: [Errno 22] Invalid argument: '\\xx.xx.xx.xx\ebw.json'

重新共享文件夹后,问题得到解决。 谢谢