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

Breaks if directory contains subdirectories #11

Closed
hexjelly opened this issue May 27, 2022 · 0 comments · Fixed by #12
Closed

Breaks if directory contains subdirectories #11

hexjelly opened this issue May 27, 2022 · 0 comments · Fixed by #12
Labels
bug Something isn't working

Comments

@hexjelly
Copy link

Traceback (most recent call last):
  File "/home/roger/.local/bin/synthetic", line 8, in <module>
    sys.exit(main())
  File "/home/roger/.local/lib/python3.10/site-packages/synthetic/__main__.py", line 78, in main
    cmd(**args)
  File "/home/roger/.local/lib/python3.10/site-packages/synthetic/iterdata.py", line 89, in parse_documents
    for name, document_path, ground_truth_path in documents:
  File "/home/roger/.local/lib/python3.10/site-packages/synthetic/iterdata.py", line 40, in iter_documents
    kind = filetype.guess(path)
  File "/home/roger/.local/lib/python3.10/site-packages/filetype/filetype.py", line 28, in guess
    return match(obj) if obj else None
  File "/home/roger/.local/lib/python3.10/site-packages/filetype/match.py", line 29, in match
    buf = get_bytes(obj)
  File "/home/roger/.local/lib/python3.10/site-packages/filetype/utils.py", line 80, in get_bytes
    return get_signature_bytes(obj)
  File "/home/roger/.local/lib/python3.10/site-packages/filetype/utils.py", line 24, in get_signature_bytes
    with open(path, 'rb') as fp:
IsADirectoryError: [Errno 21] Is a directory: 'build/stories'
@hexjelly hexjelly added the bug Something isn't working label May 27, 2022
augustak added a commit that referenced this issue May 27, 2022
@augustak augustak mentioned this issue May 27, 2022
augustak added a commit that referenced this issue May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant