Windows 10 new install fails with Unhandled exception in script

Specific support for Deluge on Microsoft Windows OS
Post Reply
Kiloseven
New User
New User
Posts: 6
Joined: Fri Dec 27, 2013 4:19 am

Windows 10 new install fails with Unhandled exception in script

Post by Kiloseven »

Just installed 64-bit Deluge in Windows 10, but it fails with

"Unhandled exception in script
Failed to execute script 'deluge-script' due to unhandled exception: [winError 10013] An attempt was made to access a socket in a way forbidden by its access permissions"
Starting Deluge with 'Run as administrator' also did not help.
Using the standard Windows Firewall, and enabled Deluge to use both public and private networks.
Also enabled ports 51000-51010 fin Windows Firewall or both TCP and UDP, both Inbound and Outbound.
However, when I went into Preferences, set the incoming port to 51000, then hit Apply then tested that port, it failed.
Changing the Incoming port to 51001, then hit Apply then tested that port, it also failed.


I'd appreciate your assistance in getting Deluge working.
Kiloseven
New User
New User
Posts: 6
Joined: Fri Dec 27, 2013 4:19 am

Re: Windows 10 new install fails with Unhandled exception in script

Post by Kiloseven »

Solved by reverting to Random Ports
Looking for the source of the (bad) advice to use ports 51000-51010.
Kiloseven
New User
New User
Posts: 6
Joined: Fri Dec 27, 2013 4:19 am

Re: Windows 10 new install fails with Unhandled exception in script

Post by Kiloseven »

Nope, didn't solve it, still fails.
gioboccaccio
New User
New User
Posts: 2
Joined: Sat Dec 10, 2022 9:18 am

Re: Windows 10 new install fails with Unhandled exception in script

Post by gioboccaccio »

I am having this same issue.

Code: Select all

Traceback (most recent call last):
  File "deluge-script.pyw", line 33, in <module>
  File "deluge\ui\ui_entry.py", line 140, in start_ui
  File "deluge\ui\gtk3\__init__.py", line 45, in start
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "deluge\ui\gtk3\gtkui.py", line 30, in <module>
  File "twisted\internet\gtk3reactor.py", line 57, in install
  File "twisted\internet\gtk3reactor.py", line 47, in __init__
  File "twisted\internet\gireactor.py", line 118, in __init__
  File "twisted\internet\_glibbase.py", line 323, in __init__
  File "twisted\internet\selectreactor.py", line 74, in __init__
  File "twisted\internet\base.py", line 627, in __init__
  File "twisted\internet\posixbase.py", line 327, in installWaker
  File "twisted\internet\posixbase.py", line 125, in __init__
PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
It started happening randomly one day so I reinstalled it and restarted my computer. It seemed to work for a bit but now it's not working again with the same error. Not sure what's changing between when it works and when it doesn't. Reinstalling it today and restarting the computer multiple times has not fixed it. Not sure what to do with this or how to fix it.
gioboccaccio
New User
New User
Posts: 2
Joined: Sat Dec 10, 2022 9:18 am

Solved? - Windows 10 new install fails with Unhandled exception in script

Post by gioboccaccio »

Disabling my VPN completely allowed it to work. Not sure what changed between now and then. But a huge fail to not even be able to use my VPN with it. I'm currently using Private Internet Access. If it's exclusive to them might have to switch providers.

Edit: I enabled portforwarding to a specific VPN port and got it working. I opened the program with the VPN off, then turned it on right away. Set the port forwarding, and my downloads started working again. However, clicking magnet links still causes the program to throw the same exception. If you copy and paste the magnet link into the program then it starts downloading it. Not sure why the magnet links don't work. Deluge shows VPN IP as the external IP so everything else is in order.

Edit 2: I finally got it working with magnet links by reinstalling my VPN. I was running the latest beta version of Private Internet Access but by rolling it back to the stable release it seems to be working... for now.
Post Reply