Thanks Mathew. It was an access issue. I was running the python script as myself and it worked, but the scheduled task was being run as a domain account where the password will never change. I created a share on the remote computer in a specific folder where the data was stored and gave this domain account access to this share. Now the scheduled task works as expected.
I'm kind of perplexed, though, why no error message was thrown up to indicate explicitly that there was no access to this location.