You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Export of any image fails on 0.33.0 and higher win64 #827
0.33.0 onwards - it works fine in 0.32.1 and below
OS
I am running Windows 10 Version 22H2 (OS Build 19045.6466)
My graphics card is an Nvdia GTX1070 on v 560.94
Scanner
Canonscan FS4000 US, Nikon Coolscan 4000, Minolta Dimage Scan Dual III - all exhibit same behaviour
Light source
Narrowband LED
Correction mode
None
Input ICC profile (if any)
Default
What happened
When exporting any file, either by right click, by using the export tab, or batch exporting, I get an "export complete - 1 failed" message in versions above 0.36.0.
I am not sure if there's any log or trace I can export and share with you to help debug this issue. I have checked it across versions and documented the behaviour below - basically something seems to have broken on 0.33.0 for me.
In v 0.35.0 it fails silently (no "failed" message is displayed)
In v 0.34.0 it declares "export successful" even though no file is exported
In v 0.33.0 fails silently
Export function works fine in 0.32.1 included and any version below
I don't know much about Windows, but I just successfully exported that file in Windows 11 running in a VM, with NegPy 0.50.0, so it's not 100% broken across the board. The log may help narrow down where and why it's failing.
Thank you both - I am now testing on 0.49.0 as I believe it is the most recent version. Let me know if you want me to try a different one.
@marcinz606 on the GPU acceleration - on a fresh install and even with GPU acceleration disable (the lightning icon goes from red to white), I am still getting the same error.
@seanharding thank you - I was able to find logs, here's what I could see
[2026-08-16 10:08:39] INFO negpy.negpy.kernel.system.parallel: CPU parallel kernels: enabled (override=None, platform=win32)
[2026-08-16 10:08:39] INFO negpy.negpy.infrastructure.storage.local_asset_store: LocalAssetStore initialized at C:\Users\tofed\Documents\NegPy\cache
[2026-08-16 10:08:40] INFO negpy.negpy.infrastructure.gpu.device: WebGPU Backend: NVIDIA GeForce GTX 1070 (DiscreteGPU) via Vulkan
[2026-08-16 10:08:40] INFO negpy.negpy.services.rendering.image_processor: ImageProcessor: Acceleration backend ready
[2026-08-16 10:08:40] INFO negpy.negpy.services.rendering.image_processor: ImageProcessor: Acceleration backend ready
[2026-08-16 10:08:40] INFO negpy.negpy.services.rendering.image_processor: ImageProcessor: Acceleration backend ready
[2026-08-16 10:08:46] INFO negpy.negpy.services.rendering.gpu_engine: GPUEngine: VRAM resources released
[2026-08-16 10:08:46] INFO negpy.negpy.services.rendering.preview_manager: load-timing decode.postprocess 38ms (fast=False) C:/Users/tofed/Desktop/dimage scans/2504-fuji100/c2025-04-13-0002.tif
[2026-08-16 10:08:46] INFO negpy.negpy.services.rendering.preview_manager: load-timing decode.resize 19ms
[2026-08-16 10:08:46] INFO negpy.negpy.services.rendering.preview_manager: load-timing decode.total 86ms (demosaic+orient+resize)
[2026-08-16 10:08:46] INFO negpy.negpy.services.rendering.preview_manager: load-timing load_splash_and_linear 139ms (decode 86ms + open)
[2026-08-16 10:08:46] INFO negpy.negpy.desktop.workers.render: load-timing preview_worker_total 142ms (load->buffer) C:/Users/tofed/Desktop/dimage scans/2504-fuji100/c2025-04-13-0002.tif
[2026-08-16 10:08:46] INFO negpy.negpy.desktop.controller: load-timing preview_e2e 264ms (load request -> decoded buffer) C:/Users/tofed/Desktop/dimage scans/2504-fuji100/c2025-04-13-0002.tif
[2026-08-16 10:08:46] INFO negpy.negpy.services.rendering.gpu_engine: load-timing gpu_init 71ms (compiled 21 shaders/pipelines)
[2026-08-16 10:08:46] INFO negpy.negpy.services.rendering.gpu_engine: load-timing analysis 230ms (bounds=False refs=True anchor=True textural=True)
[2026-08-16 10:08:46] INFO negpy.negpy.desktop.controller: load-timing first_render 494ms (buffer -> painted) C:/Users/tofed/Desktop/dimage scans/2504-fuji100/c2025-04-13-0002.tif
[2026-08-16 10:08:58] ERROR negpy.negpy.desktop.controller: Worker failure: [WinError 5] Access is denied: 'C:\\Users\\tofed\\Desktop\\tmpkkjc6rua.part' -> 'C:/Users/tofed/Desktop\\test.jpg.jpg'
[2026-08-16 10:08:58] ERROR negpy.negpy.infrastructure.storage.local_asset_store: Failed to save thumbnail 9158a6ed781946e50e8253c7faf55fb3d9299e9f3b5ce02453101abb16b47971: [Errno 13] Permission denied: 'C:\\Users\\tofed\\Documents\\NegPy\\cache\\thumbnails\\9158a6ed781946e50e8253c7faf55fb3d9299e9f3b5ce02453101abb16b47971.jpg'
At first thought, this is a permission error so I run negpy again as administrator - but I still got that permission denied error.
I also thought maybe my antivirus (Avast) is doing something odd so I disabled that for a few minutes, but still got exactly the same error.
So finally I thought, it might be how the installer is packaged, so I pointed the export folder to where I had installed Negpy (C/program Files/Negpy) and sure enough the thumbnail saving failed (see log below), but image saving succeeded.
[2026-08-16 10:15:00] ERROR negpy.negpy.infrastructure.storage.local_asset_store: Failed to save thumbnail 9158a6ed781946e50e8253c7faf55fb3d9299e9f3b5ce02453101abb16b47971: [Errno 13] Permission denied: 'C:\\Users\\tofed\\Documents\\NegPy\\cache\\thumbnails\\9158a6ed781946e50e8253c7faf55fb3d9299e9f3b5ce02453101abb16b47971.jpg'
So narrowing down the bug, it seems to me NegPy subprocesses/workers do not have permission to write to folders/directories outside of where it's installed, regardless of whether NegPy.exe is run as admin or not.
Let me know if there's something I can do to further help on this? Thanks as well for the time you put into this project.
Those two errors come from different code paths, which rules out a lock or a rename race: the export fails at the os.replace in export.py:207-210, but the thumbnail fails at a plain Image.save in local_asset_store.py:90. One cause blocks both, hits Documents and Desktop but not Program Files, survives elevation, and is unaffected by Avast: Defender's Controlled Folder Access. It protects exactly those folders and allow-lists per executable, so a path or signature change at 0.33.0 would drop NegPy off the list.
Get-MpPreference | Select-Object EnableControlledFolderAccess returns 0 on my system.
The same if run as admin
The list of events returns empty in both cases.
I also checked the registry in \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access, can confirm it's a zero.
The issue persists on a clean install as well on the machine.
My folder theory was wrong, and thanks for testing it that thoroughly.
I diffed 0.32.1 against 0.33.0. Nothing in that release touches the export write path. What it does change is the exposure pipeline and the GPU code, including the shaders: services/rendering/gpu_engine.py, features/exposure/logic.py, exposure.wgsl and metrics.wgsl. That fits your symptoms better than anything on the filesystem side. If the render fails on your GTX 1070 there is no image to save, which would look silent in 0.33.0, like a false success in 0.34.0, and like "1 failed" later, and no permission or antivirus change would ever help.
Could you grab the log from the moment an export fails rather than from startup? A shader or pipeline error there would confirm it.
Correction to my last comment: your own log rules that out. The .part temp file was created and written on the Desktop before anything failed, so the image data existed, and [WinError 5] lands on the rename of that file. The thumbnail failure is a plain Image.save with no rename at all. A render producing nothing never gets that far, so scratch the shader theory.
The thing none of us has explained is that Program Files worked while Desktop and Documents failed, which is backwards for an ordinary permission fault. Are your Desktop and Documents folders redirected into OneDrive?
Hey @MohammedAlkindi - no, neither documents nor desktop are linked or redirected to Onedrive. I keep a single onedrive folder.
The log I shared above is the entire log I have from a fresh open to export. I don't think the GPU is at fault here since it renders just fine and it is able to export to the folder Negpy was installed into.
I'm thinking some permission is set incorrectly at install time so that the worker is unable to write to anywhere outside of the install folder.
It also weakens what I had ready to send. I can reproduce your exact error that way: os.replace() onto an existing read-only destination raises [WinError 5], while the same call succeeds when the destination is plain, hidden or system.
probe, Windows 11, CPython 3.13.13, replicating export.py:264-267
plain (control) dest attrs=0x20 -> os.replace OK
READONLY dest attrs=0x1 -> PermissionError(13, 'Access is denied')
HIDDEN dest attrs=0x2 -> os.replace OK
SYSTEM dest attrs=0x4 -> os.replace OK
But that needs the destination to already exist, and you see fresh exports failing to any folder outside the install directory. So it is probably not your cause.
What separates the two, run as the same account that runs NegPy:
"x"|Out-File"$env:USERPROFILE\Desktop\probe.txt"
If that writes fine while NegPy fails to the same folder, the export worker's process context is the thing to look at, not the folder's permissions.
Activity
seanharding commentedon Aug 14, 2026
Can you share your negpy.log? I think on Windows it should be in Documents\NegPy\negpy.log. That might have the error in it.
seanharding commentedon Aug 14, 2026
I don't know much about Windows, but I just successfully exported that file in Windows 11 running in a VM, with NegPy 0.50.0, so it's not 100% broken across the board. The log may help narrow down where and why it's failing.
marcinz606 commentedon Aug 14, 2026
try without GPU acceleration
wtpfede commentedon Aug 16, 2026
Thank you both - I am now testing on 0.49.0 as I believe it is the most recent version. Let me know if you want me to try a different one.
@marcinz606 on the GPU acceleration - on a fresh install and even with GPU acceleration disable (the lightning icon goes from red to white), I am still getting the same error.
@seanharding thank you - I was able to find logs, here's what I could see
So finally I thought, it might be how the installer is packaged, so I pointed the export folder to where I had installed Negpy (C/program Files/Negpy) and sure enough the thumbnail saving failed (see log below), but image saving succeeded.
[2026-08-16 10:15:00] ERROR negpy.negpy.infrastructure.storage.local_asset_store: Failed to save thumbnail 9158a6ed781946e50e8253c7faf55fb3d9299e9f3b5ce02453101abb16b47971: [Errno 13] Permission denied: 'C:\\Users\\tofed\\Documents\\NegPy\\cache\\thumbnails\\9158a6ed781946e50e8253c7faf55fb3d9299e9f3b5ce02453101abb16b47971.jpg'So narrowing down the bug, it seems to me NegPy subprocesses/workers do not have permission to write to folders/directories outside of where it's installed, regardless of whether NegPy.exe is run as admin or not.
Let me know if there's something I can do to further help on this? Thanks as well for the time you put into this project.
MohammedAlkindi commentedon Aug 19, 2026
Those two errors come from different code paths, which rules out a lock or a rename race: the export fails at the
os.replaceinexport.py:207-210, but the thumbnail fails at a plainImage.saveinlocal_asset_store.py:90. One cause blocks both, hits Documents and Desktop but not Program Files, survives elevation, and is unaffected by Avast: Defender's Controlled Folder Access. It protects exactly those folders and allow-lists per executable, so a path or signature change at 0.33.0 would drop NegPy off the list.@wtpfede this settles it:
1means enabled. I have not reproduced it: CFA is off on my machine.wtpfede commentedon Aug 23, 2026
Hey @MohammedAlkindi - thanks for your kind reply
I don't think that is the issue
Get-MpPreference | Select-Object EnableControlledFolderAccessreturns 0 on my system.The same if run as admin
The list of events returns empty in both cases.
I also checked the registry in \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access, can confirm it's a zero.
The issue persists on a clean install as well on the machine.
MohammedAlkindi commentedon Aug 24, 2026
My folder theory was wrong, and thanks for testing it that thoroughly.
I diffed 0.32.1 against 0.33.0. Nothing in that release touches the export write path. What it does change is the exposure pipeline and the GPU code, including the shaders:
services/rendering/gpu_engine.py,features/exposure/logic.py,exposure.wgslandmetrics.wgsl. That fits your symptoms better than anything on the filesystem side. If the render fails on your GTX 1070 there is no image to save, which would look silent in 0.33.0, like a false success in 0.34.0, and like "1 failed" later, and no permission or antivirus change would ever help.Could you grab the log from the moment an export fails rather than from startup? A shader or pipeline error there would confirm it.
MohammedAlkindi commentedon Aug 24, 2026
Correction to my last comment: your own log rules that out. The
.parttemp file was created and written on the Desktop before anything failed, so the image data existed, and[WinError 5]lands on the rename of that file. The thumbnail failure is a plainImage.savewith no rename at all. A render producing nothing never gets that far, so scratch the shader theory.The thing none of us has explained is that Program Files worked while Desktop and Documents failed, which is backwards for an ordinary permission fault. Are your Desktop and Documents folders redirected into OneDrive?
wtpfede commentedon Aug 27, 2026
Hey @MohammedAlkindi - no, neither documents nor desktop are linked or redirected to Onedrive. I keep a single onedrive folder.
The log I shared above is the entire log I have from a fresh open to export. I don't think the GPU is at fault here since it renders just fine and it is able to export to the folder Negpy was installed into.
I'm thinking some permission is set incorrectly at install time so that the worker is unable to write to anywhere outside of the install folder.
MohammedAlkindi commentedon Aug 29, 2026
That rules out my OneDrive question, thanks.
It also weakens what I had ready to send. I can reproduce your exact error that way:
os.replace()onto an existing read-only destination raises[WinError 5], while the same call succeeds when the destination is plain, hidden or system.probe, Windows 11, CPython 3.13.13, replicating
export.py:264-267But that needs the destination to already exist, and you see fresh exports failing to any folder outside the install directory. So it is probably not your cause.
What separates the two, run as the same account that runs NegPy:
If that writes fine while NegPy fails to the same folder, the export worker's process context is the thing to look at, not the folder's permissions.