Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output json path not always contains dirname #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Output json path not always contains dirname #1

wants to merge 1 commit into from

Conversation

banderlog
Copy link

Without this patch python3 ./voc2coco.py ../Annotations/ tmp.json will raise an exception:

Number of xml files: 1750
Traceback (most recent call last):
  File "./voc2coco.py", line 153, in <module>
    convert(xml_files, args.json_file)
  File "./voc2coco.py", line 133, in convert
    os.makedirs(os.path.dirname(json_file), exist_ok=True)
  File "/usr/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
FileNotFoundError: [Errno 2] No such file or directory: ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant