iterative / dataset-registry

Dataset registry DVC project
67 stars 39 forks source link

prepare.py takes directory as argument, returns error #6

Closed MayankGoel28 closed 4 years ago

MayankGoel28 commented 4 years ago

I get this error:

Traceback (most recent call last):
  File "prepare.py", line 60, in <module>
    with io.open(input, encoding='utf8') as fd_in:
IsADirectoryError: [Errno 21] Is a directory: 'data'

When I run python3 prepare.py data as suggested if no argument is entered

This is also in reference to another issue https://github.com/iterative/dataset-registry/issues/5, as data.xml does not exist

shcheklein commented 4 years ago

I think prepare.py expects a file. Why do you try to pass a directory into it? Where did you get this command?

MayankGoel28 commented 4 years ago

On running python prepare.py The output is:

Arguments error. Usage:
    python prepare.py data

This is directly from the code in prepare.py, here:

if len(sys.argv) != 2:
    sys.stderr.write('Arguments error. Usage:\n')
    sys.stderr.write('\tpython prepare.py data\n')
    sys.exit(1)

Running it as python prepare.py data.xml does not work, as data.xml does not exist to begin with, as referenced in https://github.com/iterative/dataset-registry/issues/5

shcheklein commented 4 years ago

Yep, may be we can improve the Usage section - like data -> data-file. But it expects a file, not a directory.

As I mentioned in #5 this is by definition, since data.xml is DVC-tracked. dvc get failed because of the wrong copy-paste.

Closing this, since it does not look like an error. We can create a separate ticket to improve prepare.py a bit.