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

[Bug] Windows图片位于磁盘根目录下,输出目录的路径异常,导致某些磁盘无法正常存放输出文件 #597

Closed
3 tasks done
XY0797 opened this issue Oct 31, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@XY0797
Copy link

XY0797 commented Oct 31, 2024

Please carefully review each item in the checklist below | 请认真检查以下清单中的每一项 | 以下のチェックリストの各項目を注意深く確認してください

  • Searched and didn't find a similar issue | 已经搜索过,没有发现类似issue | 類似の問題が見つかりませんでした
  • Searched documentation and didn't find relevant content | 已经搜索过文档,没有发现相关内容 | ドキュメントを検索して関連する内容が見つかりませんでした
  • Tried with the latest version and the issue still exists | 已经尝试使用过最新版,问题依旧存在 | 最新バージョンを試しましたが問題は解消されませんでした

Software Version | 软件版本 | ソフトウェアバージョン

1.3.2

Operating System | 操作系统 | オペレーティングシステム

Windows x64

System Version | 系统版本 | システムバージョン

Windows 11

Describe the bug | 描述错误 | BUGの説明

image

如图所示,这种目录是不符合规范的,在某些硬盘上会导致出错

To reproduce | 复现步骤 | 再現方法

  1. 准备一张图片,放到某个盘的根目录下
  2. 使用本软件超分
  3. 错误即可复现

Error log | 报错日志 | ログ

2024-11-01 00:34:47.060 | SUCCESS  | Final2x_core.src.SRqueue:SR_queue:83 - ______Process_Completed______: R:\2.jpg
2024-11-01 00:34:47.113 | SUCCESS  | __main__:main:81 - ______SR_COMPLETED______
2024-11-01 00:34:47.126 | ERROR    | __main__:open_folder:49 - [WinError 2] ϵͳ�Ҳ���ָ�����ļ���: 'R:outputs'
2024-11-01 00:34:47.126 | ERROR    | __main__:open_folder:50 - cannot open output folder

Additional context | 附加内容 | 追加コンテキスト

测试在内存盘内进行,但是后续把软件和图片都移动到SSD硬盘,也能复现路径的异常。
但是在我SSD里面,这种错误的路径是能被正常解析识别的,可以正常的创建文件夹和写出文件。
所以说此BUG可能影响内存盘、虚拟磁盘、网络驱动器等特殊硬盘,对普通硬盘影响不大。

@XY0797 XY0797 added the bug Something isn't working label Oct 31, 2024
@Tohrusky
Copy link
Owner

现在这ai还能自动pr了?哈人 你看看他修的 ci build 可以吗

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Can this AI automatically perform PR now? Kazakh man, can you take a look at the ci build he built?

@Tohrusky
Copy link
Owner

看起来是不行的hh bug发生在python侧

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


It seems that it doesn’t work. The hh bug occurs on the python side.

@Tohrusky
Copy link
Owner

打个断点看看这呢,文件夹没创建出来吗
https://github.com/Final2x/Final2x-core/blob/main/src/Final2x_core/src/SRqueue.py#L19

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Make a breakpoint and look at this. Is the folder not created?
https://github.com/Final2x/Final2x-core/blob/main/src/Final2x_core/src/SRqueue.py#L19

@XY0797
Copy link
Author

XY0797 commented Oct 31, 2024

打个断点看看这呢,文件夹没创建出来吗 https://github.com/Final2x/Final2x-core/blob/main/src/Final2x_core/src/SRqueue.py#L19

这个问题是出在路径选取。
R:\1.jpg
R:outputs
很明显“:”后面得有个\
这个bug只影响特殊驱动器,比如说虚拟磁盘等,它们严格要求路径得符合规范。
正常硬盘哪怕文件夹路径有这个问题,也会自动忽略,文件夹能创建成功的。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Make a breakpoint and look at this. Is the folder not created? https://github.com/Final2x/Final2x-core/blob/main/src/Final2x_core/src/SRqueue.py#L19

The problem is with path selection.
R:\1.jpg
R:outputs
Obviously there must be a \ after ":"
This bug only affects special drives, such as virtual disks, which strictly require paths to comply with specifications.
Even if a normal hard disk has this problem with the folder path, it will be automatically ignored and the folder can be created successfully.

@Tohrusky
Copy link
Owner

这个问题是出在路径选取。 R:\1.jpg R:outputs 很明显“:”后面得有个\

我是说 output_path: Path = Path(config.outputpath) / "outputs" ,它这里创建出的目录是 R:/outputs 还是什么

我不熟悉windows,不过试了下可以处理挂载的磁盘里的图片,用内存盘是有什么特殊需求吗

此外请给全log,我还得看看是不是前端传过去的路径不对

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


This problem lies in path selection. R:\1.jpg R:outputs Obviously there must be a \ after ":"

I mean output_path: Path = Path(config.outputpath) / "outputs". Is the directory created here R:/outputs or something?

I'm not familiar with Windows, but I tried it and it can process the pictures in the mounted disk. Are there any special requirements for using the memory disk?

In addition, please provide the full log. I also need to see if the path passed by the front end is wrong.

@Tohrusky
Copy link
Owner

手动设置一下输出目录吧 应该可以避免这个问题

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Manually setting the output directory should avoid this problem.

@XY0797 XY0797 closed this as completed Nov 2, 2024
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

No branches or pull requests

4 participants
@Tohrusky @Issues-translate-bot @XY0797 and others