简体   繁体   English

Debian升级后找不到扭曲插件

[英]Twistd Plugin not found after Debian upgrade

After I upgraded from debian jessie to stretch, twistd does not find my plugin anymore. 从debian jessie升级到Stretch后,twistd找不到我的插件了。 I could not find what's wrong. 我找不到问题所在。 I guess I need to specify some path now which wasn't neccessary before or similar. 我想我现在需要指定一些以前不需要的路径或类似路径。

I get the error /usr/bin/twistd: Unknown command: otfbot and in the list of Commands, the two commands of the software are not listed anymore. 我收到错误/usr/bin/twistd: Unknown command: otfbot ,在命令列表中,该软件的两个命令不再列出。 The directory structure of the plugins for twisted is Twisted插件的目录结构为

twisted/plugins/genconfig_plugin.py
twisted/plugins/otfbot_plugin.py

And both instantiate a ServiceMaker. 两者都实例化ServiceMaker。

Twisted 16.4 removed the feature of twistd (and trial and all other Twisted command line scripts) which caused it to add the current working directory to sys.path . Twisted 16.4删除了twistd (以及trial和所有其他Twisted命令行脚本)的功能,导致该功能将当前工作目录添加到sys.path If you were relying on your working directory to allow your code to be found when using a version of Twisted older than 16.4 (Debian Jessie includes 14.0.2) and you've upgraded to version 16.4 or newer (Debian Stretch includes 16.6.0) , you must now explicitly add the desired directories to the import path yourself, perhaps by setting up a virtualenv or by setting PYTHONPATH directly. 如果您依靠工作目录来允许在使用Twisted低于16.4的版本(Debian Jessie包括14.0.2)时找到您的代码,并且您已升级到16.4或更高版本(Debian Stretch包括16.6.0) ,您现在必须自行将所需的目录显式添加到导入路径,这可能是通过设置virtualenv或直接设置PYTHONPATH来实现的。

This was an accidental change and is not documented in the release notes (despite the clear, confusing user-facing consequences). 这是一个偶然的更改,没有在发行说明中进行记录(尽管存在明显的,令人困惑的面向用户的后果)。

For more details, you can read this mailing list thread: 有关更多详细信息,您可以阅读以下邮件列表主题:

http://twistedmatrix.com/pipermail/twisted-python/2016-September/030780.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM