Skip to content
This repository has been archived by the owner on Mar 20, 2020. It is now read-only.

Images in Subfolders #26

Open
benwr opened this issue Jul 6, 2019 · 0 comments
Open

Images in Subfolders #26

benwr opened this issue Jul 6, 2019 · 0 comments

Comments

@benwr
Copy link
Owner

benwr commented Jul 6, 2019

From @jay-pee in #7 , copying here as it's a slightly different issue

When putting images in subfolders an error occurs:

Traceback (most recent call last):
  File "c:\Users\Philip\Documents\GitHub\ankdown\ankdown\ankdown.py", line 389, in main
    cards_to_apkg(card_iterator, pkg_arg)
  File "c:\Users\Philip\Documents\GitHub\ankdown\ankdown\ankdown.py", line 343, in cards_to_apkg
    copyfile(abspath, newpath) # This is inefficient but definitely works on all platforms.
  File "C:\Python36\lib\shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'assets/images/philly-magic-garden.jpg'

Maybe we have to create the folder before putting the image there with copyfile(abspath, newpath).
Or change the newpath variable.

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

No branches or pull requests

1 participant