yarss2 egg for python 3.10

Suggest, post, or discuss plugins for Deluge
eygraber
New User
New User
Posts: 1
Joined: Mon Aug 22, 2022 4:52 am

yarss2 egg for python 3.10

Post by eygraber »

After updating Ubuntu to 22.04 I couldn't get yarss to work anymore. It seemed like the problem is that Python has been updated to 3.10, and there are no 3.10 eggs on the yarss project.

I created one, and it seems to have fixed the issue. I can't upload here because it is too big (7mb). What's the best place I can put this in case others need it as well?
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: yarss2 egg for python 3.10

Post by mhertz »

You're a class act! :)

I usually go for paste.c-net.org when under 50MiB, just because unlimited time stored(roughly), command-line support(curl etc) and no adds/waiting, but whatever suits you best of-course.

Deluge 2.0.5+ or about that, doesn't need rebuilds of plugins usually, though yarss2 is an exception because of way setup, though can just be renamed then, but many don't know that, so will be useful regardless.

Thanks!
poet_imp
New User
New User
Posts: 3
Joined: Mon Apr 20, 2020 10:50 pm

Re: yarss2 egg for python 3.10

Post by poet_imp »

@eygraber I have tried to compile the egg without success. I would much appreciate your sharing your working plug-in.
irishj
New User
New User
Posts: 2
Joined: Sun Jan 01, 2023 1:37 pm

Re: yarss2 egg for python 3.10

Post by irishj »

@eygraber I would also love if you could share the plugin you created. Thanks !
marcun
New User
New User
Posts: 6
Joined: Wed Mar 22, 2023 12:31 am

Re: yarss2 egg for python 3.10

Post by marcun »

@eygraber I would also love to have a copy!! I was just googling to see if I could figure out how to compile my own, but yours would save me a ton of time.

Also tried just renaming the 3.9 version to 3.10, and I got it to show up in the list, but it wouldn't let me activate it. Lol.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: yarss2 egg for python 3.10

Post by mhertz »

marcun, and others needing such, you simply need to rename it, and I have just tested it again working, in an ubuntu 22.04 VM, both the py3.9 and py3.8 version working fine in py3.10 environment. If not enabling, then you must have renamed to wrong py version, which I just also reproduced, and I would suggest stripping everything away from filename regarding pyx.x, for simplicity and upgrade-friendlyness(python).

Note this shouldn't even be needed in latest deluge versions, but for some reason I always found yarss2 to be different, dunno why, and is single plugin I found which actually still needing correct version still, or no version, preferably imho, even on latest deluge 2.1.1.

Hope helps, otherwise let me know more info, e.g. debug logging preferably, but I suspect not needed though(it doesn't have special needs I believe, and the ones it does, it includes directly itself).
basher
Leecher
Leecher
Posts: 91
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia/Spain

Re: yarss2 egg for python 3.10

Post by basher »

In short, if you have a plugin file such as Plugin-1.0-py3.7.egg, you can remove the python version from the filename and rename it as Plugin-1.0.egg -- it should work with any deluge 2 version; just make sure you don't use plugins that were for python2 (eg Plugin-1.0-py2.6.egg would be a no go for deluge v2).
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: yarss2 egg for python 3.10

Post by mhertz »

Just for the record, reason for yarss2 specifically breaking the fix for not need rename plugins anymore, is because uses 'pkg_resources.require()' a few places, which despite then deluge having made plugin loadable in first place with 'pkg_resources.Environment(python=None)', then the 'pkg_resources.require()' still is adhering to python version checking in filename unfortunetly.
marcun
New User
New User
Posts: 6
Joined: Wed Mar 22, 2023 12:31 am

Re: yarss2 egg for python 3.10

Post by marcun »

Sorry for the slow response, just getting back to troubleshooting this. Ok, that still isn't working for me for some reason. I've tried renaming a version 3.9 egg that I previously downloaded to 3.10 (and everything from 3.5 to 3.10). I even tried removing the -py3.10 from the filename altogether. But the same behavior remains. If I click on the checkbox, it immediately unchecks itself.

So some more info on my setup, I am attempting to run Deluge on a Synology NAS. For clarity, I actually already have Deluge setup and running on the same NAS inside a Docker container, albeit it's only on version 2.0.3. However, I noticed the other day that synocommunity had released a synology package compatible for DSM 7.1 and the package page says it uses Python 3.10. I know some people prefer Docker and VMs, but I like the simplicity of just having my stuff installed like a normal app. I actually modified the ports on my Docker version so they wouldn't conflict with the synocommunity version, which still works. In both instances, I am running deluge headless and accessing it either through the web client or on a client installed on my Windows 11 computer. And you have to use a thin client to configure YaRSS2 anyway. My windows version appears to use python 3.9 (by looking at the deluge/deluge/plugins folder). So I have the 3.9 version loaded in my appdata/roaming/deluge/plugins folder (again, which works for my docker version just fine, even though I have version 3.6 installed on the Docker side). But I also tried renaming the one in my windows folder to 3.10, just to try it. No matter what I tired the plugin immediately unchecks as soon as I try to check it.

I ran a debug log, but doesn't look like I can attach it (maybe I'm too new here). But the relevant part seems to be where I tried to enable it 3 times:

22:17:58 [DEBUG ][deluge.ui.gtk3.preferences :61 ] on_plugin_toggled - YaRSS2: False
22:17:58 [DEBUG ][deluge.ui.gtk3.preferences :61 ] on_plugin_selection_changed
22:17:58 [WARNING ][deluge.ui.gtk3.preferences :67 ] Failed to enable plugin: YaRSS2
22:17:59 [DEBUG ][deluge.ui.gtk3.preferences :61 ] on_plugin_toggled - YaRSS2: False
22:17:59 [WARNING ][deluge.ui.gtk3.preferences :67 ] Failed to enable plugin: YaRSS2
22:18:00 [DEBUG ][deluge.ui.gtk3.preferences :61 ] on_plugin_toggled - YaRSS2: False
22:18:00 [WARNING ][deluge.ui.gtk3.preferences :67 ] Failed to enable plugin: YaRSS2
22:18:01 [DEBUG ][deluge.ui.gtk3.preferences :61 ] on_button_apply_clicked

Thanks for any advice in advance!
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: yarss2 egg for python 3.10

Post by mhertz »

Please do what basher stated, remove all traces of py-version, see his post again if need be. I know you stated you had, but just reiterating, as no reason leaving possibility for mistakes open from specifying wrong version when not having to.

Anyway I need the actual traceback error message, so if you could please post what referenced in the the log from the [ERROR] parts, specifically from the section mentioning 'Traceback' - you can make a search - also probably easier to make debug-log with just error-level, so e.g. 'deluge -L error -l <PATH-TO-LOG>'. This is an example of what needed:

Code: Select all

12:37:54 [ERROR   ][deluge.pluginmanagerbase          :153 ] Unable to instantiate plugin 'YaRSS2' from '/home/martin/.config/deluge/plugins/YaRSS2-2.1.5-py3.9.egg'!
12:37:54 [ERROR   ][deluge.pluginmanagerbase          :1512] The 'YaRSS2' distribution was not found and is required by the application
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin
    instance = cls(plugin_name.replace('-', '_'))
  File "/home/martin/.config/deluge/plugins/YaRSS2-2.1.5-py3.9.egg/yarss2/__init__.py", line 44, in __init__
    load_libs()
  File "/home/martin/.config/deluge/plugins/YaRSS2-2.1.5-py3.9.egg/yarss2/__init__.py", line 31, in load_libs
    egg = pkg_resources.require("YaRSS2")[0]
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 966, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 827, in resolve
    dist = self._resolve_dist(
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 868, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'YaRSS2' distribution was not found and is required by the application
martin@arch ~ % 
Again reiterating, make sure you use newest plugin version, for py3.x, and just deleting that from name(python version).

Thanks.
Post Reply