Skip to content

FileNotFoundError #4

@ams0

Description

@ams0

I run photog in a docker container (python:3 and then just pip install photog), mounting a directory from the host. The files are simply named CK-20230224-kubernetes_3.5-11715.jpg; after running photog I get:

root@04184f3b7387:/photos# photog .
Traceback (most recent call last):
  File "/usr/local/bin/photog", line 10, in <module>
    photog.create_website(root[0])
  File "/usr/local/lib/python3.11/site-packages/photog/__init__.py", line 40, in create_website
    photos = rename_images(dir)
             ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/photog/__init__.py", line 56, in rename_images
    im = Image.open(os.path.join(dir, image))
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/PIL/Image.py", line 3227, in open
    fp = builtins.open(filename, "rb")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './CK-20230223-kubernetes_3.5-11065.jpg'

and files renamed to _CK-20230223-kubernetes_3.5-11065.jpg. Not sure how to fix this..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions