4Manuals

  • PDF Cloud HOME

Python没有这样的文件或目录,但有文件[Celery,Docker] Download

    如何将文本边界框与pyplot.Rectangle对齐? 尝试使用unix:///var/run/docker.sock 导入类问题 在Python数据框中选择列时出错 使用Rabbit的pika确认消息 如何在按住键的同时暂停VideoStream? Python OpenCV 如何在多用户的Mac上设置我的docker gitlab数据文件夹? TypeError:无法处理此数据类型 使用buildozer不会下载sdl2_image 如何使用docker文件中的curl在容器中发布json文件

以下是我的代码。它由docker容器内的Celery工作人员执行。它基本上会读取每张图像并从中渲染视频。

for index, local_image_url in enumerate(local_images_urls_from_this_position):
        try:
            image = Image.open(local_image_url)
            image = image.resize((image_width, image_height), Image.ANTIALIAS)
            image = image.numpy()
            video.write(image)
        except Exception as e:
            log.error(f"Exception while rendering current image at {local_image_url}: {e}")

该代码在本地计算机上可以正常工作,但是在容器中,它始终一致地引发了找不到图像的异常。

webcam-backend-celery      | [2019-12-30 12:06:12,263: ERROR/ForkPoolWorker-4] Exception while rendering current image at /app/media/localhost/1577701813939.png: [Errno 2] No such file or directory: '/app/media/localhost/1577701813939.png'
webcam-backend-celery      | [2019-12-30 12:06:12,263: ERROR/ForkPoolWorker-4] Exception while rendering current image at /app/media/localhost/1577703014070.png: [Errno 2] No such file or directory: '/app/media/localhost/1577703014070.png'

我可以确保图像在那里:

enter image description here

0 个答案:

没有答案



Similar searches
    Linking.addEventListener在React Native中不起作用 我如何以及在何处可以查看/查找使用`context.reportStatus`记录的信息? 从设备上卸载我的应用程序后,该应用程序将无法从Android Studio运行 Firefox同步多个UserProfiles 使用Express连接到SQL Server(React项目)