Page 1 of 2

Unhandled exception in script: [WinError 5] Access is denied

Posted: June 10th, 2022, 3:16 pm
by the_Unforgiven
Cooee all
I have been using SABnzbd for yonks without problem, till now. My NVMe died so I used a HDD while a new NVMe was slowly coming in the mail. While I was waiting, I installed a new OS. Eveything was fine until I cloned from HDD to NVMe & M$ was doing some updates and I think it broke something. I should also point out that WLAN AutoConfig has never started, even thou I tried to kick it in services.msc, but she does not want to start. Luckily, I had a spare range extender & a short ethernet cable; that will do for my ADSL2+ connection.

I un-installed SABnzbd, ran a reg cleaner, then re-installed it, and it still can back with the error; it even did it in safe mode.
I run Windoze 10 Pro from my MSI X570 mobo with a 3800X CPU

This is the message that is inside:- Failed to execute script 'SABnzbd' due to unhandled exception: [WinError 5] Access is denied

I was going to put what was inside the box here, but I get a message that says new users can't post links. I am only posting what the errors were, they are not links. So I took a picture instead, but I can't even put a picture on here. So how do I show you the other 2 dozen lines of error code?

Here's the link to read what's in the box - pastebin . com/trSnzNiv <Take away the space either side of the . I am not allowed to post links, I am a newbie
Blame sander for that, he pointed me to pastebin. Hey sander, I also ran it in admin mode, it made zero difference

Thank you for just reading about my problem, I usually fix them myself, but I can't this time; I must be getting old

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 10th, 2022, 3:33 pm
by sander
post it on pastebin, on post the URL here like pastebin . com / djdjdjdjdka

Also: first Google hits says "solution is usually to be sure to run the program as an administrator (right click, run as administrator.)"

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 10th, 2022, 3:57 pm
by safihre
It could also be that the SABnzbd files got corrupted or modified by virusscanner etc.
Have you tried a fresh installation?
This could also happen I think when you have set a custom port for SABnzbd but it's a protected port.

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 10th, 2022, 4:52 pm
by the_Unforgiven
safihre wrote: June 10th, 2022, 3:57 pm It could also be that the SABnzbd files got corrupted or modified by virusscanner etc.
Have you tried a fresh installation?
This could also happen I think when you have set a custom port for SABnzbd but it's a protected port.
In the 2nd paragraph I did the un & re thingie. I have never set any custom ports for SABnzbd, I let it have free rein

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 11th, 2022, 2:47 am
by safihre
Did it work to reinstall?

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 11th, 2022, 3:17 am
by the_Unforgiven
safihre wrote: June 11th, 2022, 2:47 am Did it work to reinstall?
No. Normal mode, safe mode & run as admin all result in the same error.
I have never had trouble before from SABnzbd

The thing is, when I re-installed it, I found the config file, and it had all the settings from the previous install; it should have been clean skin after a reg clean. I may have to go into the registry manually and delete everything I can find from SABnzbd; also all files from SABnzbd!
Anything else I should be looking to do?

p.s. thank you for your help

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 11th, 2022, 3:35 am
by sander
why don't you post your logging ... and we as helpers can more focus

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 11th, 2022, 3:52 am
by the_Unforgiven
sander wrote: June 11th, 2022, 3:35 am why don't you post your logging ... and we as helpers can more focus
What do you mean? I thought what the error codes that I uploaded to paste bin was enough?

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 11th, 2022, 4:16 am
by safihre
I missed the log before, sorry. I checked it now and indeed python is denied permission to the windows registry to read.
Sounds like some special virusscanner or other policy that prevent this? Since running as Administrator also doesn't work..

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 11th, 2022, 4:29 am
by the_Unforgiven
safihre wrote: June 11th, 2022, 4:16 am I missed the log before, sorry. I checked it now and indeed python is denied permission to the windows registry to read.
Sounds like some special virusscanner or other policy that prevent this? Since running as Administrator also doesn't work..
But what does it all mean?
Does it have something to do with my WLAN AutoConfig not being able to start? (I reckon there is something wrong in Group Policy)

I gave it 'Grant Admin Full Control" - same problem
I gave it 'start with admin' - same problem
I gave it 'Windoze 7 compatability' - same problem

If it has full admin rights, it should be able to access the registry? right?

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 11th, 2022, 4:56 am
by sander
the_Unforgiven wrote: June 11th, 2022, 3:52 am
sander wrote: June 11th, 2022, 3:35 am why don't you post your logging ... and we as helpers can more focus
What do you mean? I thought what the error codes that I uploaded to paste bin was enough?
Ah, you edited the pastebin url into your original post ... I hadn't seen that.

For (google) reference:

Code: Select all

Traceback (most recent call last):
...
  File "mimetypes.py", line 255, in read_windows_registry
PermissionError: [WinError 5] Access is denied

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 11th, 2022, 5:16 am
by the_Unforgiven
sander wrote: June 11th, 2022, 4:56 am
the_Unforgiven wrote: June 11th, 2022, 3:52 am
sander wrote: June 11th, 2022, 3:35 am why don't you post your logging ... and we as helpers can more focus
What do you mean? I thought what the error codes that I uploaded to paste bin was enough?
Ah, you edited the pastebin url into your original post ... I hadn't seen that.

For (google) reference:

Code: Select all

Traceback (most recent call last):
...
  File "mimetypes.py", line 255, in read_windows_registry
PermissionError: [WinError 5] Access is denied
and where is the rest?

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 11th, 2022, 5:40 am
by the_Unforgiven
safihre wrote: June 11th, 2022, 4:16 am I missed the log before, sorry. I checked it now and indeed python is denied permission to the windows registry to read.
Sounds like some special virusscanner or other policy that prevent this? Since running as Administrator also doesn't work..
I have even let SABnzbd have full rein in Norton Security. It might be time to re-install Norton Security, or get another Windoze Security; I wonder if it has something to do with me nuking Defender? I used a program to delete it from my comp: I hate Defender >:D

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 20th, 2022, 1:03 am
by the_Unforgiven
I went into the registry and removed all instances of 'SABnzbd'
I then re-installed the latest version of Windoze SABnzbd
Upon starting SABnzbd I get this:-
Unhandled exception in script
Failed to execute script 'SABnzbd' due to unhandled exception: [WinError 5] Access is denied

Traceback (most recent call last):
File "SABnzbd.py", line 46, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "cherrypy\__init__.py", line 73, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "cherrypy\_cptools.py", line 28, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "cherrypy\lib\static.py", line 29, in <module>
File "cherrypy\lib\static.py", line 22, in _setup_mimetypes
File "mimetypes.py", line 368, in init
File "mimetypes.py", line 253, in read_windows_registry
PermissionError: [WinError 5] Access is denied

Re: Unhandled exception in script: [WinError 5] Access is denied

Posted: June 20th, 2022, 1:15 am
by sander
Maybe time for a fresh Windows install, and no cloning?