stg-annon / stashapp-tools Goto Github PK
View Code? Open in Web Editor NEWTools to interface with stashapps API
Home Page: https://pypi.org/project/stashapp-tools/
License: MIT License
Tools to interface with stashapps API
Home Page: https://pypi.org/project/stashapp-tools/
License: MIT License
Python Version: 3.10.11
stashapp-tools Version: 0.2.38
Stash Version: 0.24.1
I updated Stash from 0.22 to 0.24.1 now this code isn't working anymore.
import stashapi.log as log
from stashapi.stashapp import StashInterface
stash = StashInterface({
"scheme": "http",
"host":"xxx.xxx.xxx.xxx",
"port": "10000",
"logger": log
})
scene_data = stash.find_images({
"organized": True
})
log.info(scene_data)
i am always getting the following error message:
☺d☻ Using stash (v0.24.1-0) endpoint at http://xxx.xxx.xxx.xxx:10000/graphql
☺e☻ GRAPHQL_VALIDATION_FAILED: Field "fingerprint" argument "type" of type "String!" is required, but it was not provided.
☺e☻ GRAPHQL_VALIDATION_FAILED: Field "fingerprint" argument "type" of type "String!" is required, but it was not provided.
☺e☻ GRAPHQL_VALIDATION_FAILED: Field "fingerprint" argument "type" of type "String!" is required, but it was not provided.
☺e☻ GRAPHQL_VALIDATION_FAILED: Field "fingerprint" argument "type" of type "String!" is required, but it was not provided.
☺e☻ GRAPHQL_VALIDATION_FAILED: Field "fingerprint" argument "type" of type "String!" is required, but it was not provided.
☺e☻ GRAPHQL_VALIDATION_FAILED: Field "fingerprint" argument "type" of type "String!" is required, but it was not provided.
☺e☻ 422 Unprocessable Entity GQL data response is null
☺e☻ 422 Unprocessable Entity query failed. v0.24.1-0
☺d☻
☺d☻ query FindImages($filter: FindFilterType, $image_filter: ImageFilterType, $image_ids: [Int!]) {
☺d☻ findImages(filter: $filter, image_filter: $image_filter, image_ids: $image_ids) {
☺d☻ count
☺d☻ images {
☺d☻ ...Image
☺d☻ }
☺d☻ }
☺d☻ }
☺d☻
☺d☻ fragment Image on Image {
☺d☻ id
☺d☻ title
☺d☻ code
☺d☻ rating100
☺d☻ urls
☺d☻ date
☺d☻ details
☺d☻ photographer
☺d☻ o_counter
☺d☻ organized
☺d☻ created_at
☺d☻ updated_at
☺d☻ visual_files { ...VisualFile }
☺d☻ paths { ...ImagePathsType }
☺d☻ galleries { id }
☺d☻ studio { id }
☺d☻ tags { ...Tag }
☺d☻ performers { id }
☺d☻ }
☺d☻ fragment VisualFile on VisualFile {
☺d☻ ... on VideoFile {
☺d☻ id
☺d☻ path
☺d☻ basename
☺d☻ parent_folder_id
☺d☻ zip_file_id
☺d☻ mod_time
☺d☻ size
☺d☻ fingerprint
☺d☻ fingerprints { ...Fingerprint }
☺d☻ format
☺d☻ width
☺d☻ height
☺d☻ duration
☺d☻ video_codec
☺d☻ audio_codec
☺d☻ frame_rate
☺d☻ bit_rate
☺d☻ created_at
☺d☻ updated_at}
☺d☻ ... on ImageFile {
☺d☻ id
☺d☻ path
☺d☻ basename
☺d☻ parent_folder_id
☺d☻ zip_file_id
☺d☻ mod_time
☺d☻ size
☺d☻ fingerprint
☺d☻ fingerprints { ...Fingerprint }
☺d☻ width
☺d☻ height
☺d☻ created_at
☺d☻ updated_at}
☺d☻ }
☺d☻ fragment Tag on Tag {
☺d☻ id
☺d☻ name
☺d☻ description
☺d☻ aliases
☺d☻ ignore_auto_tag
☺d☻ created_at
☺d☻ updated_at
☺d☻ image_path
☺d☻ scene_count
☺d☻ scene_marker_count
☺d☻ image_count
☺d☻ gallery_count
☺d☻ performer_count
☺d☻ parents { id }
☺d☻ children { id }
☺d☻ parent_count
☺d☻ child_count
☺d☻ }
☺d☻ fragment ImagePathsType on ImagePathsType {
☺d☻ thumbnail
☺d☻ preview
☺d☻ image
☺d☻ }
☺d☻ fragment Fingerprint on Fingerprint {
☺d☻ type
☺d☻ value
☺d☻ }
☺d☻ Variables: {'filter': {'per_page': -1, 'q': ''}, 'image_filter': {'organized': True}}
I would appreciate it if you could support gallerychapters as well.
They were added here:
stashapp/stash#3289
GRAPHQL_VALIDATION_FAILED: Cannot query field "aliases" on type "Performer".
422 Unprocessable Entity GQL data response is null
422 Unprocessable Entity query failed. v0.24.0-3
Exception: 422 Unprocessable Entity query failed. v0.24.0-3
How can I add performers to scenes? I've tried to update the scene like this:
stash.update_scene({'id': 1, 'performers': [{ 'id': 10 }, { 'id': 220 }]})
But I get a unknown filed error
No matter the id of provided, find_image will return None even though the id exists
Tried
find_image('1234') > None
find_image(1234) > GRAPHQL_ERROR: must not be null ['findImage', 'file', 'mod_time']
I've been trying to use stashapp-tools after a while (which used to work perfectly), however, I'm getting the following error when trying to initialize the StashInterface class:
e Could not connect to Stash at http://:/graphql e 'NoneType' object is not subscriptable
When trying to access GraphQL directly from http://:/playground that works perfectly fine.
Any ideas what might have changed? Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.