Server Error - Python not copying file locally to network drive
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I get this error when running my python tool in alteryx server. Code works fine running locally!
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-2-96a5f19bac15> in <module> 11 dest_path = Path(r'\\networkdrive\New_mod_Request.csv') 12 ---> 13 shutil.copyfile(source_path ,dest_path ) 14 15 d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\shutil.py in copyfile(src, dst, follow_symlinks) 259 os.symlink(os.readlink(src), dst) 260 else: --> 261 with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst: 262 # macOS 263 if _HAS_FCOPYFILE: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Test\\OneDrive\\Desktop\\Request\\New_mod_Request.csv'
code -
source_path = Path(r'C:\Users\Test\OneDrive\Request\New_mod_Request.csv')
dest_path = Path(r'\\networkdrive\New_mod_Request.csv')
shutil.copyfile(source_path ,dest_path )
any help would be appreciated?
- Labels:
- Custom Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Felipe_Ribeir0 even when Its happening in my python?! th sever still doesnt want to work!?!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@wonka1234 yes, one machine does not have access to local folders of another machine, it does not matter which tool you are using. You will need to use a folder that is shared with the Alteryx Server to make it work with any tool.
Imagine that the Alteryx Server machine is just another computer. How this computer would access your local folders?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Felipe_Ribeir0 I see. Still trying to figure out my sharepoint list, power automate python problem!
