'Plugin not found in subcommand - Twisted (22.4.0)

My project structure is as below. I couldn't find enough data from the twisted documentation

-rolling
       ->roll
            ->__init__.py
            ->rollserver.py
       ->twisted
             ->plugins
                     ->roll_plugin.py

My roll_plugin.py looks like this-

from zope.interface import implementer
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from utils.annon_edro import Options, GPMSBridgeService
from roll..rollserver import RollFactory


@implementer(IServiceMaker, IPlugin)
class MyServiceMaker(object):
    tapname = "roll"
    description = 'Open the great door of roll for default'
    options = Options

    def makeService(self, options):
        return internet.TCPServer(8999, RollFactory())

serviceMaker = MyServiceMaker()

I ran twistd --help I do not see the sub command there. Whilst this code runs fine with Python2 but not with Python3.10.

  1. What am I doing wrong here?
  2. Is there any way we debug twistd code?


Solution 1:[1]

The directory path was missing in sys.path, adding it worked for me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vaishali Chuphal