You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then run spacy project assets which fails with the following (reduced) stacktrace:
Traceback (most recent call last):
...
File "/venv/lib/python3.8/site-packages/spacy/cli/project/assets.py", line 39, in project_assets_cli
project_assets(
File "/venv/lib/python3.8/site-packages/spacy/cli/project/assets.py", line 105, in project_assets
git_checkout(
File "/venv/lib/python3.8/site-packages/spacy/cli/_util.py", line 407, in git_checkout
shutil.copytree(str(source_path), str(dest))
File "/usr/lib/python3.8/shutil.py", line 555, in copytree
with os.scandir(src) as itr:
NotADirectoryError: [Errno 20] Not a directory: '/tmp/tmpw_23425/CITATION.cff'
The reason for the error is that shutil.copytree expects a directory and not a single file.
Your Environment
Operating System: Ubuntu 20.04
Python Version Used: 3.8.10
spaCy Version Used: 3.4.4
The text was updated successfully, but these errors were encountered:
Our Git fetcher code assumed that the asset to be copied was a
directory. Support files as well and add tests to check both the file
and directory cases.
Fixes #12168.
Our Git fetcher code assumed that the asset to be copied was a
directory. Support files as well and add tests to check both the file
and directory cases.
Fixes #12168.
Using a file in a git repository as an asset in a spacy project configuration fails because the code expects only directories.
How to reproduce the behaviour
Use a file in a git repository as an asset in the
projects.yml
as described in the documentation:Here is a code example trying to use spacy's citation file as an asset:
Then run
spacy project assets
which fails with the following (reduced) stacktrace:The reason for the error is that shutil.copytree expects a directory and not a single file.
Your Environment
The text was updated successfully, but these errors were encountered: