Skip to content

[BUG] The specified layout exceeds the size of the photo sheet #7

@FunnyYear

Description

@FunnyYear

一些验证

Some verifications

  • 是否查看 wiki、issues 后自己尝试解决

Have you tried to resolve the issue by checking the wiki and existing issues?

  • 确保 您的问题能在 releases 发布的最新版本(包含测试版本)上复现 (如果不是请先更新到最新版本复现后再提交问题)

Please ensure your issue can be reproduced on the latest version (including test versions) released in releases (if not, please update to the latest version and reproduce the issue before submitting it)

  • 搜索检查是否已经存在请求相同功能的问题/讨论,以避免重复创建问题

Search to check if there are already issues/discussions requesting the same feature to avoid duplication

  • 确认知晓并同意维护者直接关闭不符合 issue 规范的问题

Acknowledge and agree that maintainers can directly close issues that do not follow the issue guidelines

  • 确保提供下列BUG描述及其复现步骤, 否则我同意维护者直接关闭问题

Ensure to provide the following bug description and reproduction steps, otherwise, I agree that maintainers can directly close the issue

BUG 描述或反馈描述

Bug description or feedback description

制作身份证照片是报错

预期的效果

Expected behavior

希望能定位问题,并给出解决方案

截图

Screenshots

(71.77980041503906, 429.88458251953125, 0.8943121433258057) (474.70855712890625, 425.220458984375, 0.9149768948554993)
[231.5570831298828, 206.70803833007812, 0.9886406660079956] [305.54193115234375, 208.48739624023438, 0.9939851760864258]
0 563 0 456
Traceback (most recent call last):
File "D:\Software\LiYing\python-embed\Lib\site-packages\gradio\queueing.py", line 626, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Software\LiYing\python-embed\Lib\site-packages\gradio\route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Software\LiYing\python-embed\Lib\site-packages\gradio\blocks.py", line 2220, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Software\LiYing\python-embed\Lib\site-packages\gradio\blocks.py", line 1731, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Software\LiYing\python-embed\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Software\LiYing\python-embed\Lib\site-packages\anyio_backends_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "D:\Software\LiYing\python-embed\Lib\site-packages\anyio_backends_asyncio.py", line 967, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Software\LiYing\python-embed\Lib\site-packages\gradio\utils.py", line 940, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "D:\Software\LiYing\src\webui\app.py", line 295, in process_and_display_wrapper
result = process_and_display(
^^^^^^^^^^^^^^^^^^^^
File "D:\Software\LiYing\src\webui\app.py", line 523, in process_and_display
result = process_image(
^^^^^^^^^^^^^^
File "D:\Software\LiYing\src\webui\app.py", line 109, in process_image
photo_sheet_cv = generator.generate_photo_sheet(processor.photo.image, sheet_rows, sheet_cols, rotate, add_crop_lines)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Software\LiYing\src\tool\PhotoSheetGenerator.py", line 41, in generate_photo_sheet
raise ValueError("The specified layout exceeds the size of the photo sheet")
ValueError: The specified layout exceeds the size of the photo sheet

系统信息

System information

window11, python v3.11

额外的信息

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions