-
Notifications
You must be signed in to change notification settings - Fork 23
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
If a gif image enters the tmp dir, it will cause Permission Error and NotADirectory error #11
Comments
It's testing on some earlier commits, I found the latest code fixes at web.py(30): TemporaryDirectory(ignore_cleanup_errors=True). |
In any case, I don't think it's a good idea just ignore it. I don't know how temp directories work in Windows, I guess these large gifs may continue to take up some space? |
can u provide a minimum example to reproduce this issue? we have been failed to reproduce this. |
你得给明白: |
报错详情首先我看到一个权限错误 表示一个gif图像正被其他进程锁定 我的猜测:temp模块正在试图删除一个gif图像的缓存 但可能由于操作系统的未知原因失败了 而且下方的代码又把它当成了一个文件夹 但清理还是失败了 我的猜测:错误发生在 我曾经试过 运行环境在两台Windows11系统和Windows10系统的PC 后续问题总之在拉取最新版代码后没有出现这个错误 以及我询问了更多使用新版代码的人 他们也没有 |
Hi @LittleApple-fp16 . We've tried all the environments available to us, including Python 3.8-3.11, and various operating systems such as Ubuntu, Windows, and macOS. Additionally, all the downloaded content is in GIF format, but we still couldn't reproduce the issue. Therefore, if this problem needs to be resolved, we'll need you to provide the minimal reproducible code on your end so that we can investigate the issue. The code we've attempted to use for reproduction is available here, but unfortunately, it hasn't reproduced successfully in any of the runtime environments. |
Thanks for your test @narugo1992. I did some tests with history code and the problem recurred. recurred even after adding this parameter |
@LittleApple-fp16 This is our try on your code with Github Action: https://github.com/narugo1992/gif_pil_test/actions/runs/7110049756/job/19355939844 . About 130+ images crawled, nothing happened, is that the same as yours? |
Weird, this is mine: |
A surprising revelation: I forked the code repository you provided, ran the code personally, and encountered the same error! However, after multiple runs in my repository, I couldn't reproduce the issue. I initially suspected subtle differences in the executed code. Still, I compared your The GitHub Action configuration file you used for running, too, matched mine. Hence, I am inclined to believe that the only possibility is the direct inclusion of waifuc source code in the repository causing this anomaly. While this sounds unbelievable, all other options have been ruled out. I will double-check to confirm shortly. |
@LittleApple-fp16 Confirmed! Deleting the local waifuc source code and adding dependencies to |
Thanks again! @narugo1992 The problem doesn't seem to be with the package, I know it may have been fixed in follow commits, but I just trying to figure out which fixed it. About package, in this test I update the waifuc source code to latest and it passed. So I decided it's the version differences, and that was the difference between 87cc9f6 & newer commits. Initially I thought that the weird bug was fixed by changes in web.py and it may cause might some cache in temp folder, however, in later tests I found that web.py history in the commit of waifuc does not affect this bug, the latest waifuc source passed the temp folder test directly. Now we can close this issue, it's confirmed that was fix in the history commit by unknown way. but I still want to know how it be fixed |
@narugo1992 lucky!! this problem appeared in the cyberharem again! and i finally found the way to solved it. in debugging the breakpoints of cyberharem, i found that using imgutils to open images in a loop is fatal. Usually, an opened image in current loop will be locked by python. when it throws out and enters the next loop, until the next be open, the image in last loop is still locked, which leads to the last image in a processing stage always being locked. There is my job, still using which commit occurs NotADirectory Error: (https://github.com/LittleApple-fp16/gif_test_windows/actions/runs/7264197580/job/19791190755) |
@LittleApple-fp16 |
其实造成这种报错的可能性非常多样 因为耗子大量使用临时目录,任何位置和原因的一个异常都可能最后抛出这个错误 所以我还是建议你单独开一个提问 尽可能详细描述你的操作 |
i got [WinError 32] and [WinError 267] on Windows10
The text was updated successfully, but these errors were encountered: