dvc 0.84.0
Mac, installation via conda
When importing a file from a git repo into a subdirectory in the current repo, dvc fails with an incorrect error message if the subdirectory does not exist.
To demonstrate this problem, run the following:
## Setup a git repo to import from
mkdir source_repo
cd source_repo
git init
echo Some code > code.txt
git add .
git commit -m "Save some code to this demo repo"
## setup a DVC repo to import from the previous
cd -
mkdir import_repo
cd import_repo
git init
dvc init
git add .
git commit -m "This is a dvc repo that will import some code"
echo --------------------------
echo The next command will fail with an incorrect error message
echo --------------------------
read -rsp $'Press any key to continue...\n' -n1 key
## Attempt an import which will fail
# This command will fail:
dvc import -o some_dir/code.txt ../source_repo code.txt
mkdir some_dir
echo --------------------------
echo Now we have made the output directory, it will succeed
echo --------------------------
read -rsp $'Press any key to continue...\n' -n1 key
dvc import -o some_dir/code.txt ../source_repo code.txt
Error message stating that the output directory does not exist
This error message:
ERROR: failed to import 'code.txt' from '../source_repo'. - The path 'code.txt' does not exist in the target repository '../source_repo' neither as an output nor a git-handled file.
Note that code.txt does exist and is committed to git. DVC successfully imports it if the subdirectory some_dir exists. 
Hi @charlesbaynham ! Thanks for reporting this issue! I am able to reproduce a similar issue with:
dvc import https://github.com/iterative/dvc scripts/innosetup/dvc.ico -o nonexistent_dir/dvc.ico
But dvc get seems to work fine with the same arguments, so some of our logic has diverged there.
Looking into it...
@charlesbaynham We've done some adjustments to import logic and now I'm getting a different error from your script:
+ dvc import -o some_dir/code.txt ../source_repo code.txt                                                                                              
ERROR: failed to import 'code.txt' from '../source_repo'. - stage working or file path '/home/efiop/git/dvc/myrepo/import_repo/some_dir' does not exist
which has a typo (will send a fix soon), but is now pointing out that the directory doesn't, which is expected behaviour now.
Thank you @efiop ! DVC is great by the way, I'm enjoying using it a lot