Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Server Error - Python not copying file locally to network drive

wonka1234
10 - Fireball

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?

 

 

4 REPLIES 4
Felipe_Ribeir0
16 - Nebula

Hi @wonka1234 

 

The server machine does not have access to your local machine folders.

wonka1234
10 - Fireball

@Felipe_Ribeir0   even when Its happening in my python?! th sever still doesnt want to work!?!

Felipe_Ribeir0
16 - Nebula

@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?

wonka1234
10 - Fireball

@Felipe_Ribeir0  I see. Still trying to figure out my sharepoint list, power automate python problem!

Labels