Skip to content

Skip scenes that no longer exist - #814

Merged
DogmaDragon merged 1 commit into
stashapp:mainfrom
kris-anderson:fix/tpdbmarkers-missing-scene
Nov 15, 2026
Merged

DogmaDragon merged 1 commit into
stashapp:mainfrom
kris-anderson:fix/tpdbmarkers-missing-scene

Conversation

@kris-anderson

Copy link
Copy Markdown
Contributor

Fixes #813

The Scene.Update.Post hook queues a Sync task with the scene id. If the scene is deleted before that task runs, stash.find_scene() returns None and processScene crashes:

TypeError: 'NoneType' object is not subscriptable

processScene now returns early with a debug log line when the scene is None. The version goes to 0.4.5, matching earlier fixes to this plugin.

Seen in production on Stash v0.32.0, where another plugin deletes some scenes right after they are updated: 11 tracebacks in two days.

🤖 Generated with Claude Code

The Scene.Update.Post hook queues a Sync task by scene id. If the scene is
deleted before that task runs, find_scene() returns None and processScene
crashed with "TypeError: 'NoneType' object is not subscriptable". Return early
with a debug log line instead. Bump to 0.4.5.

Fixes stashapp#813

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@discourse-stashapp

Copy link
Copy Markdown

This pull request has been mentioned on Stash Forum. There might be relevant details there:

https://discourse.stashapp.cc/t/the-porn-db-markers/1335/28

@DogmaDragon DogmaDragon added the type:plugin Plugins label Nov 5, 2026
@kris-anderson kris-anderson changed the title [The Porn DB Markers] Skip scenes that no longer exist Skip scenes that no longer exist Nov 5, 2026
@Tweeticoats

Copy link
Copy Markdown
Contributor

This looks good.
Like the debug suggests you can have a pending event on a scene and run the clean task that deletes the scene from stash before it is processed so just skipping this is fine.

@DogmaDragon
DogmaDragon merged commit 538b0ff into stashapp:main Nov 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TPDBMarkers] TypeError: 'NoneType' object is not subscriptable when the scene no longer exists

4 participants