Description
Bug Report
Description
DVC native packages bundled with pyinstaller
don't include the Google API Discovery cache directory containing the drive.v2.json
file, which is essential for the Google Drive remote operations.
This issue could be seamlessly fixed with pyinstaller/pyinstaller-hooks-contrib#97, but we might need to find an alternative until the changes on that pull request get released through a stable channel. I guess that we could temporarily add the patched hook-googleapiclient.model.py
file as part of our custom hooks directory.
How to reproduce
-
Create an empty project:
$ mkdir test && cd test $ git init && dvc init Initialized empty Git repository in ./test/.git/ Initialized DVC repository.
-
Add a dummy file:
$ touch file && dvc add file WARNING: 'file' is empty. ···
-
$ dvc remote add origin gdrive://root $ dvc remote modify origin gdrive_use_service_account true $ dvc remote modify origin gdrive_service_account_json_file_path account.json
-
Reproduce the issue:
$ dvc push --remote origin ERROR: unexpected error - name: drive version: v2
Note: these steps have been reproduced with the official dvc_2.0.5_amd64.deb
build.
Expected result
Ideally, dvc pull
should be able to pull data from the Google Drive remote.
$ dvc push --remote origin
···
Environment information
Output of dvc doctor
$ dvc doctor
DVC version: 2.0.5 (deb)
---------------------------------
Platform: Python 3.7.10 on Linux-5.4.0-1040-azure-x86_64-with-debian-bullseye-sid
Supports: All remotes
Cache types: <https://error.dvc.org/no-dvc-cache>
Caches: local
Remotes: None
Workspace directory: ext4 on /dev/root
Repo: dvc, git
Additional Information
This issue is specific to pyinstaller
builds, and has been succesfully reproduced with the binaries generated through the build_posix.sh
packaging script:
Lines 91 to 95 in 8c1d46e
Our iterative/setup-dvc
GitHub Action also seems to be affected by this issue on every environment but the Windows ones, which rely exclusively on PyPI packages.