stashapp / CommunityScripts

This is a public repository containing plugin and utility scripts created by the Stash Community.
https://docs.stashapp.cc/add-ons/
GNU Affero General Public License v3.0
191 stars 147 forks source link

renamerOnUpdate throwing out errors on dryrun #466

Open rlab88 opened 6 days ago

rlab88 commented 6 days ago

I just set up RoU and went to test it out on a single file during dryrun, but the stash log is showing errors when I hit "organize" on that file. Seems to be errors with code within the renamerOnUpdate.py, and not my config.py file, though I'm sure if what's in my config file could cause this if I made a mistake there. Has this plugin been working right for others lately? I saw the "known issue for V24" pinned at the top, and wondering if there hasn't been an update to fix that yet.

Here are the logs:

2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] AttributeError: 'set' object has no attribute 'get' 2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] if config.studio_templates.get(current_studio["name"]): 2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] File "C:\Users\Plex.stash\plugins\community\renamerOnUpdate/renamerOnUpdate.py", line 397, in get_template_filename 2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] template["filename"] = get_template_filename(stash_scene) 2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] File "C:\Users\Plex.stash\plugins\community\renamerOnUpdate/renamerOnUpdate.py", line 1269, in renamer 2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] renamer(FRAGMENT_SCENE_ID) 2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] File "C:\Users\Plex.stash\plugins\community\renamerOnUpdate/renamerOnUpdate.py", line 1594, in 2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] Traceback (most recent call last): 2024-11-19 14:11:21Error [Plugin / renamerOnUpdate] main function error: 'set' object has no attribute 'get' 2024-11-19 14:11:21Info [Plugin / renamerOnUpdate] Dry mode on

rlab88 commented 6 days ago

This seems to be specific to that line of code. I commented out the section in renamerOnUpdate.py that renames by studio tag (contains the line highlighted in the log) since I dont plan on using that method, and now it works fine. Seems like this could be an easy fix if someone can rewrite that line and use something other that "get" for what it's trying to do.