Closed rlab88 closed 11 hours ago
ModuleNotFoundError:` No module named 'stashapi
The problem is listed in the first error line. It's missing the stashapi module. Almost all plugins require this module. You can install this module, and the other two required modules using the below command lines.
pip install stashapp-tools --upgrade
pip install requests
pip install psutil
If above modules are already installed, and you're getting this error, then it's because you have multiple python installations. I myself ran into this exact same issue when I upgraded to the latest version of Stash. I have code in the latest version of RenameFile (ver 0.5.5) that will automatically install any missing modules on the python installation being used by Stash, but you have to uncomment the lines of code from line #7 through #13. Make sure to download the latest version from following path: https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/RenameFile
After RenameFile runs successfully, I recommend commenting out those line of code, because that adds an extra work load on the RenameFile script which you really don't want every time the script gets called.
Thank you, that fixed it for me. I now am getting files renamed, but the behavior is not quite as expected - the "studio" field returns the studio code as a number, is this the expected behavior? I was hoping it would populate as the name of the studio rather than show "44496" for example.
the "studio" field returns the studio code as a number, is this the expected behavior?
That's not expected behavior. I fixed this right before going on a short vacation, so I didn't get a chance to test it very well. I'll look into, and create a fix.
the studio rather than show "44496" for example.
Can you please confirm that you are getting this issue using the latest version 0.5.5?
I have a fix for this, but I can't uploaded it yet due to changes in DupFileManager plugin which are not ready for upload.
I hope to be able to post the fix by COB Monday (25 Nov).
Fix is in version 0.5.6 at https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/RenameFile.
You can get it there, or wait later this week when it goes to CommunityScripts.
Great, thanks for the update date! Appreciate it!
On Tue, Nov 26, 2024 at 6:35 AM David Maisonave @.***> wrote:
Fix is in version 0.5.6 at https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/RenameFile .
You can get it there, or wait later this week when it goes to CommunityScripts https://github.com/stashapp/CommunityScripts/tree/main/plugins/RenameFile .
— Reply to this email directly, view it on GitHub https://github.com/David-Maisonave/Axter-Stash/issues/4#issuecomment-2500964910, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJ2S4R6IORPQQTXF7IXFCJT2CSBK3AVCNFSM6AAAAABR4JPXGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBQHE3DIOJRGA . You are receiving this because you authored the thread.Message ID: @.***>
Please enter steps to reproduce the behavior.
Note: this has been tried both with dry run enabled and disabled. Attempt to update a file's title in stash and save the edit. Nothing happens to the filename.
Stash Version (from Settings -> About)
v0.27.2-24-g5f690d96
Plugin Version
0.4.6
What Operating System (OS)?
windows 11
What browser and version?
Firefox 132.0.2 (64-bit)
Phone or tablets (if applicable)
No response
The pip install for the plugin
0.4.6-97999c1
Expected Behavior
I added "test" to the end of a scene title, so the file should update with the new metadata format and the word test.
Logging
2024-11-15 18:01:24Error Scene.Update.Post [RenameFile]: returned error: exit status 1 2024-11-15 18:01:24Error [Plugin / RenameFile] ModuleNotFoundError: No module named 'stashapi' 2024-11-15 18:01:24Error [Plugin / RenameFile] ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-15 18:01:24Error [Plugin / RenameFile] import stashapi.log as log # Importing stashapi.log as log for critical events ONLY 2024-11-15 18:01:24Error [Plugin / RenameFile] File "C:\Users\Plex.stash\plugins\community\renamefile/renamefile.py", line 7, in
2024-11-15 18:01:24Error [Plugin / RenameFile] Traceback (most recent call last):
Snapshot(s)
No response
Additional context
No response