Publish failing, even if it actually worked

Hey,

I have been experiencing something odd recently, where I have my publishing Deadline task failing because of versioning.

Version '9' from instance 'renderCompositingMain' that you are trying to publish is lower or equal to an existing version in the database. Version in database: '9'.Please version up your workfile to a higher version number than: '9'.

But actually the publishing worked and everything is as it should be, so I feel like it started the publishing process, failed at some point and then keeps retrying.

I have no exact evidence of that happening, since it is pretty random and happens randomly but the closest I can get is from that log:

2026-03-02 17:44:30:  0: STDOUT: DEBUG:urllib3.connectionpool:http://192.168.192.1:7000 "POST /api/actions/tasks/3e6af188-32e8-4f54-a94f-24a902b59b25/comments/0bdee90e-ef9e-484e-9d0c-7b6f561f3bf2/add-preview HTTP/1.1" 201 615
2026-03-02 17:46:37:  0: STDOUT: DEBUG:urllib3.connectionpool:http://192.168.192.1:7000 "POST /api/pictures/preview-files/b915e528-9489-4137-9ae3-b72d1117bec3 HTTP/1.1" 504 176
2026-03-02 17:46:37:  0: STDOUT: ERROR:pyblish.plugin:Traceback (most recent call last):
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Program Files\Ynput\AYON 1.4.1\dependencies\requests\models.py", line 971, in json
2026-03-02 17:46:37:  0: STDOUT:     return complexjson.loads(self.text, **kwargs)
2026-03-02 17:46:37:  0: STDOUT:   File "json\__init__.py", line 346, in loads
2026-03-02 17:46:37:  0: STDOUT:   File "json\decoder.py", line 337, in decode
2026-03-02 17:46:37:  0: STDOUT:   File "json\decoder.py", line 355, in raw_decode
2026-03-02 17:46:37:  0: STDOUT: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2026-03-02 17:46:37:  0: STDOUT: During handling of the above exception, another exception occurred:
2026-03-02 17:46:37:  0: STDOUT: Traceback (most recent call last):
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Users\adrie\AppData\Local\Ynput\AYON\dependency_packages\ayon_2510091624_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
2026-03-02 17:46:37:  0: STDOUT:     runner(*args)
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Users\adrie\AppData\Local\Ynput\AYON\addons\kitsu_1.2.6\ayon_kitsu\plugins\publish\integrate_kitsu_review.py", line 43, in process
2026-03-02 17:46:37:  0: STDOUT:     gazu.task.add_preview(
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Users\adrie\AppData\Local\Ynput\AYON\dependency_packages\ayon_2510091624_windows.zip\dependencies\gazu\task.py", line 971, in add_preview
2026-03-02 17:46:37:  0: STDOUT:     return upload_preview_file(
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Users\adrie\AppData\Local\Ynput\AYON\dependency_packages\ayon_2510091624_windows.zip\dependencies\gazu\task.py", line 937, in upload_preview_file
2026-03-02 17:46:37:  0: STDOUT:     return raw.upload(path, file_path, client=client)
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Users\adrie\AppData\Local\Ynput\AYON\dependency_packages\ayon_2510091624_windows.zip\dependencies\gazu\client.py", line 421, in upload
2026-03-02 17:46:37:  0: STDOUT:     result = response.json()
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Program Files\Ynput\AYON 1.4.1\dependencies\requests\models.py", line 975, in json
2026-03-02 17:46:37:  0: STDOUT:     raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
2026-03-02 17:46:37:  0: STDOUT: requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2026-03-02 17:46:37:  0: STDOUT: Traceback (most recent call last):
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Program Files\Ynput\AYON 1.4.1\dependencies\requests\models.py", line 971, in json
2026-03-02 17:46:37:  0: STDOUT:     return complexjson.loads(self.text, **kwargs)
2026-03-02 17:46:37:  0: STDOUT:   File "json\__init__.py", line 346, in loads
2026-03-02 17:46:37:  0: STDOUT:   File "json\decoder.py", line 337, in decode
2026-03-02 17:46:37:  0: STDOUT:   File "json\decoder.py", line 355, in raw_decode
2026-03-02 17:46:37:  0: STDOUT: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2026-03-02 17:46:37:  0: STDOUT: During handling of the above exception, another exception occurred:
2026-03-02 17:46:37:  0: STDOUT: Traceback (most recent call last):
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Users\adrie\AppData\Local\Ynput\AYON\dependency_packages\ayon_2510091624_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
2026-03-02 17:46:37:  0: STDOUT:     runner(*args)
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Users\adrie\AppData\Local\Ynput\AYON\addons\kitsu_1.2.6\ayon_kitsu\plugins\publish\integrate_kitsu_review.py", line 43, in process
2026-03-02 17:46:37:  0: STDOUT:     gazu.task.add_preview(
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Users\adrie\AppData\Local\Ynput\AYON\dependency_packages\ayon_2510091624_windows.zip\dependencies\gazu\task.py", line 971, in add_preview
2026-03-02 17:46:37:  0: STDOUT:     return upload_preview_file(
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Users\adrie\AppData\Local\Ynput\AYON\dependency_packages\ayon_2510091624_windows.zip\dependencies\gazu\task.py", line 937, in upload_preview_file
2026-03-02 17:46:37:  0: STDOUT:     return raw.upload(path, file_path, client=client)
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Users\adrie\AppData\Local\Ynput\AYON\dependency_packages\ayon_2510091624_windows.zip\dependencies\gazu\client.py", line 421, in upload
2026-03-02 17:46:37:  0: STDOUT:     result = response.json()
2026-03-02 17:46:37:  0: STDOUT:   File "C:\Program Files\Ynput\AYON 1.4.1\dependencies\requests\models.py", line 975, in json
2026-03-02 17:46:37:  0: STDOUT:     raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
2026-03-02 17:46:37:  0: STDOUT: requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2026-03-02 17:46:37:  0: STDOUT: !!! ERR: 2026-03-02 17:46:37,867 >>> { CLI-publish }: [ Failed IntegrateKitsuReview: Expecting value: line 1 column 1 (char 0) -- <FrameSummary file C:\Program Files\Ynput\AYON 1.4.1\dependencies\requests\models.py, line 975 in json> ] 

what is the expecting value mentioned here? This happened after OIIO conversion, file transfer, review upload, etc which might have caused the task to requeue, and then show the versioning issue.

Any hints will be appreciated!
Thanks

Those JSON decode errors seem close to something I’ve seen before, back then they were related to custom attributes that were changed by type but some entities still had the old values. But I may be misremembering.

@martin.wacker do you know by any chance?

Actually the failing call goes through gazu.task.add_preview( which means that likely it’s failing on the response of gazu from Kitsu.

It seems that in this case Kitsu is failing to respond with valid data where we did expect a result?

Could the issue be that the preview takes too long to upload and returns a timeout?

It could be - the actual response comes directly through the gazu library and it’s failing internally. So it’d be somewhat up to Kitsu to respond to perhaps?