Skip to content

[BUG] deluge and from_deluge: Unhandled error in plugin from_deluge: module 'ssl' has no attribute 'wrap_socket' #12

Closed
@atajsic

Description

@atajsic

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

On deluge and from_deluge, the following error occurs:
Unhandled error in plugin from_deluge: module 'ssl' has no attribute 'wrap_socket'

Expected Behavior

Successful connection to deluge

Steps To Reproduce

Step 1: install latest image
Step 2: try and connect to deluge via the deluge or from_deluge plugin
Step 3: critical crash

Environment

OS: docker

CPU architecture

x86-64

Docker creation

flexget:
    image: lscr.io/linuxserver/flexget
    container_name: flexget
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Australia/Sydney
      - FG_LOG_LEVEL=info
      - FG_LOG_FILE=/config/flexget.log
      - FG_CONFIG_FILE=/config/.flexget/config.yml
    volumes:
      - ./flexget:/config
      - /media/downloads:/media/downloads
    networks:
      - proxy

Container logs

2024-06-25 14:06:57 CRITICAL task          my-task BUG: Unhandled error in plugin from_deluge: module 'ssl' has no attribute 'wrap_socket'
Traceback (most recent call last):

  File "/usr/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f10600cad40><Thread(task_queue, started daemon 139708153867064)>
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f10600caa20><Thread(task_queue, started daemon 139708153867064)>
  File "/usr/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(task_queue, started daemon 139708153867064)>
    │    │        │     ()
    │    │        └ <Thread(task_queue, started daemon 139708153867064)>
    │    └ <bound method TaskQueue.run of <flexget.task_queue.TaskQueue object at 0x7f1057ded3d0>><Thread(task_queue, started daemon 139708153867064)>
  File "/lsiopy/lib/python3.12/site-packages/flexget/task_queue.py", line 46, in run
    self.current_task.execute()
    │    │            └ <function Task.execute at 0x7f105c2cbba0>
    │    └ <flexget.task.Task object at 0x7f10574d5370><flexget.task_queue.TaskQueue object at 0x7f1057ded3d0>
  File "/lsiopy/lib/python3.12/site-packages/flexget/task.py", line 87, in wrapper
    return func(self, *args, **kw)
           │    │      │       └ {}
           │    │       ()
           │    └ <flexget.task.Task object at 0x7f10574d5370><function Task.execute at 0x7f105c2cbb00>
  File "/lsiopy/lib/python3.12/site-packages/flexget/task.py", line 716, in execute
    self._execute()
    │    └ <function Task._execute at 0x7f105c2cba60><flexget.task.Task object at 0x7f10574d5370>
  File "/lsiopy/lib/python3.12/site-packages/flexget/task.py", line 685, in _execute
    self.__run_task_phase(phase)
    │                     └ 'start'<flexget.task.Task object at 0x7f10574d5370>
  File "/lsiopy/lib/python3.12/site-packages/flexget/task.py", line 514, in __run_task_phase
    response = self.__run_plugin(plugin, phase, args)
               │                 │       │      └ (<flexget.task.Task object at 0x7f10574d5370>, {'host': '<<redacted>>', 'username': ''<<redacted>>', 'password': ''<<redacted>>', 'filter':...
               │                 │       └ 'start'
               │                 └ <PluginInfo(name=from_deluge)>
               └ <flexget.task.Task object at 0x7f10574d5370>
> File "/lsiopy/lib/python3.12/site-packages/flexget/task.py", line 547, in __run_plugin
    result = method(*args, **kwargs)
             │       │       └ {}
             │       └ (<flexget.task.Task object at 0x7f10574d5370>, {'host': ''<<redacted>>', 'username': ''<<redacted>>', 'password': ''<<redacted>>', 'filter':...
             └ <Event(name=plugin.from_deluge.start,func=on_task_start,priority=128)>
  File "/lsiopy/lib/python3.12/site-packages/flexget/event.py", line 21, in __call__
    return self.func(*args, **kwargs)
           │    │     │       └ {}
           │    │     └ (<flexget.task.Task object at 0x7f10574d5370>, {'host': ''<<redacted>>', 'username': ''<<redacted>>', 'password': ''<<redacted>>', 'filter':...
           │    └ <bound method InputDeluge.on_task_start of <flexget.plugins.clients.deluge.InputDeluge object at 0x7f10579bd910>>
           └ <Event(name=plugin.from_deluge.start,func=on_task_start,priority=128)>
  File "/lsiopy/lib/python3.12/site-packages/flexget/plugins/clients/deluge.py", line 138, in on_task_start
    super().on_task_start(task, config)
                          │     └ {'host': ''<<redacted>>', 'username': ''<<redacted>>', 'password': ''<<redacted>>', 'filter': {'label': 'flexget'}, 'port': 58846}
                          └ <flexget.task.Task object at 0x7f10574d5370>
  File "/lsiopy/lib/python3.12/site-packages/flexget/plugins/clients/deluge.py", line 25, in on_task_start
    self.setup_client(config)
    │    │            └ {'host': ''<<redacted>>', 'username': ''<<redacted>>', 'password': ''<<redacted>>', 'filter': {'label': 'flexget'}, 'port': 58846}
    │    └ <function DelugePlugin.setup_client at 0x7f1059c40d60>
    └ <flexget.plugins.clients.deluge.InputDeluge object at 0x7f10579bd910>
  File "/lsiopy/lib/python3.12/site-packages/flexget/plugins/clients/deluge.py", line 51, in setup_client
    return DelugeRPCClient(
           └ <class 'deluge_client.client.DelugeRPCClient'>
  File "/lsiopy/lib/python3.12/site-packages/deluge_client/client.py", line 71, in __init__
    self._create_socket()
    │    └ <function DelugeRPCClient._create_socket at 0x7f1057556480>
    └ <deluge_client.client.DelugeRPCClient object at 0x7f10574d5280>
  File "/lsiopy/lib/python3.12/site-packages/deluge_client/client.py", line 77, in _create_socket
    self._socket = ssl.wrap_socket(socket.socket(socket.AF_INET, socket.SOCK_STREAM))
    │              │               │      │      │      │        │      └ <SocketKind.SOCK_STREAM: 1>
    │              │               │      │      │      │        └ <module 'socket' from '/usr/lib/python3.12/socket.py'>
    │              │               │      │      │      └ <AddressFamily.AF_INET: 2>
    │              │               │      │      └ <module 'socket' from '/usr/lib/python3.12/socket.py'>
    │              │               │      └ <class 'socket.socket'>
    │              │               └ <module 'socket' from '/usr/lib/python3.12/socket.py'>
    │              └ <module 'ssl' from '/usr/lib/python3.12/ssl.py'>
    └ <deluge_client.client.DelugeRPCClient object at 0x7f10574d5280>

AttributeError: module 'ssl' has no attribute 'wrap_socket'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions