voc / voctopublish

This repository contains a glue script that reads information from the C3TT and talks to voctoweb, youtube and twitter.
https://c3voc.de
GNU General Public License v3.0
8 stars 12 forks source link

depublishing fails with #111

Open jbeyerstedt opened 1 week ago

jbeyerstedt commented 1 week ago

I tried to de-publish a video, but only got this output:

2024-09-22 21:24:21,136 - root - DEBUG {depublish.py:116} creating C3TTClient
2024-09-22 21:24:21,136 - root - INFO {depublish.py:218} requesting ticket from tracker
2024-09-22 21:24:21,136 - root - DEBUG {client.py:85} creating XML RPC proxy: https://tracker.c3voc.de/rpc?group=Vz6WN6ZSD48EPWFBYMtNZDEhRxqyaqBD&hostname=releasing.c3voc.de
2024-09-22 21:24:21,136 - root - DEBUG {client.py:120} C3TT.assignNextUnassignedForState['recording', 'removing', {'EncodingProfile.IsMaster': 'yes'}, 'cf65572bc1dcddf2629bbac9d90c6c77931b6448b91b455a581640520372ce11']
2024-09-22 21:24:21,239 - root - INFO {depublish.py:226} Ticket ID:144881
2024-09-22 21:24:21,239 - root - DEBUG {client.py:85} creating XML RPC proxy: https://tracker.c3voc.de/rpc?group=Vz6WN6ZSD48EPWFBYMtNZDEhRxqyaqBD&hostname=releasing.c3voc.de
2024-09-22 21:24:21,239 - root - DEBUG {client.py:120} C3TT.getTicketProperties[144881, 'fbf14033b42da66fc54b2e08001d90d050c6953bc5ab9ae66df10d456084d8fc']
2024-09-22 21:24:21,317 - root - DEBUG {depublish.py:229} Ticket Properties: {'Encoding.Language': 'deu', 'Fahrplan.Abstract': 'Alle Projekte werden auf der großen Bühne vorgestellt.', 'Fahrplan.Date': '2024-09-22', 'Fahrplan.DateTime': '2024-09-22T13:30:00+0200', 'Fahrplan.Day': '3', 'Fahrplan.Duration': '01:00', 'Fahrplan.GUID': 'e3f109fa-44e6-55b9-9651-977fae50e71d', 'Fahrplan.ID': 123, 'Fahrplan.Language': 'de', 'Fahrplan.Person_list': 'Anna, Hanno', 'Fahrplan.Persons': 'Anna, Hanno', 'Fahrplan.Recording.Optout': '0', 'Fahrplan.Room': 'betahaus-buehne', 'Fahrplan.Slug': 'jhhh24-123-abschlussprsentation-hamburg', 'Fahrplan.Start': '13:30', 'Fahrplan.Title': 'Abschlusspräsentation Hamburg', 'Fahrplan.Track': 'Präsentationen', 'Fahrplan.Type': 'Präsentationen', 'Fahrplan.URL': 'https://fahrplan.alpaka.space/jhhh24/talk/GX9SYX/', 'Meta.License': 'Licensed to the public under https://creativecommons.org/licenses/by-sa/4.0/', 'Meta.Year': '2024', 'Processing.Auphonic.Enable': 'no', 'Processing.BasePath': '/video', 'Processing.File.Intro': '/video/intros/jh24-hh//123.ts', 'Processing.File.Outro': '/video/intros/jh24-hh/outro.ts', 'Processing.Framerate': '25', 'Processing.Intro.Duration': '9.952656', 'Processing.Loudnorm.Enable': 'no', 'Processing.MasterMe.Enable': 'yes', 'Processing.Path.Intros': '/video/intros/jh24-hh/', 'Processing.Path.Outro': '/video/intros/jh24-hh/outro.ts', 'Project.Slug': 'jh24-hh', 'Publishing.Path': '/video/encoded/jugendhackt/', 'Publishing.Upload.SkipSlaves': 'speedy,tweety,blade1,blade2,blade3,blade4', 'Publishing.UploadTarget': 'upload@releasing.c3voc.de:/video/encoded/jugendhackt/', 'Publishing.Voctoweb.Enable': 'yes', 'Publishing.Voctoweb.Path': '/cdn.media.ccc.de/events/jugendhackt/2024/', 'Publishing.Voctoweb.Slug': 'jh24', 'Publishing.Voctoweb.Thumbpath': '/static.media.ccc.de/events/jugendhackt/2024/', 'Publishing.YouTube.Category': '27', 'Publishing.YouTube.Enable': 'yes', 'Publishing.YouTube.Privacy': 'public', 'Publishing.YouTube.TitleSuffix': ' | Jugend hackt Hamburg 2024', 'Publishing.YouTube.Token': '<redacted>', 'Record.Cutdiffseconds': '3354.88', 'Record.Cutin': '10', 'Record.Cutinseconds': '0.4', 'Record.Cutout': '83882', 'Record.Cutoutseconds': '3355.28', 'Record.DurationFrames': '90000', 'Record.DurationSeconds': '3600', 'Record.EndPadding': '0', 'Record.Language': 'deu', 'Record.Language.0': 'deu', 'Record.MountCmd': ' /usr/bin/fuse-ts p="betahaus-buehne-" c="/video/capture/jh24-hh/" st="2024-09-22_13-30-00" numfiles=21 totalframes=90000  -oallow_other,use_ino "/video/fuse//jh24-hh/betahaus-buehne/123" ', 'Record.Room': 'betahaus-buehne', 'Record.StartPadding': '0'}
2024-09-22 21:24:21,317 - Ticket - WARNING {ticket_module.py:67} optional property 'Meta.Acronym' was not in ticket
2024-09-22 21:24:21,317 - Ticket - DEBUG {ticket_module.py:70} 'Meta.Acronym' = None
2024-09-22 21:24:21,318 - root - DEBUG {client.py:85} creating XML RPC proxy: https://tracker.c3voc.de/rpc?group=Vz6WN6ZSD48EPWFBYMtNZDEhRxqyaqBD&hostname=releasing.c3voc.de
2024-09-22 21:24:21,318 - root - DEBUG {client.py:120} C3TT.setTicketFailed[b"TicketException: Property 'Encoding.LanguageTemplate' is missing or empty in ticket", 'dd87d7aab0662861434fae8188ac79ae62facc46b72432d20bb00805193f8bef']
Traceback (most recent call last):
  File "/home/voc/publishing/voctopublish/depublish.py", line 281, in <module>
    worker.depublish()
  File "/home/voc/publishing/voctopublish/depublish.py", line 134, in depublish
    self.ticket_id, self.ticket = self._get_ticket_from_tracker()
  File "/home/voc/publishing/voctopublish/depublish.py", line 233, in _get_ticket_from_tracker
    t = PublishingTicket(tracker_ticket, ticket_id, self.config)
  File "/home/voc/publishing/voctopublish/model/ticket_module.py", line 171, in __init__
    self.language_template = self._get_str("Encoding.LanguageTemplate")
  File "/home/voc/publishing/voctopublish/model/ticket_module.py", line 69, in _get_str
    raise TicketException(f"Property '{key}' is missing or empty in ticket")
model.ticket_module.TicketException: Property 'Encoding.LanguageTemplate' is missing or empty in ticket
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/voc/.local/lib/python3.9/site-packages/c3tt_rpc_client/client.py", line 121, in _open_rpc
    result = getattr(proxy, method)(*args)
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1116, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1456, in __request
    response = self.__transport.request(
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1160, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1176, in single_request
    return self.parse_response(resp)
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1348, in parse_response
    return u.close()
  File "/usr/lib/python3.9/xmlrpc/client.py", line 662, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32500: 'Database error'>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/voc/publishing/voctopublish/depublish.py", line 284, in <module>
    worker.c3tt.set_ticket_failed(
  File "/home/voc/.local/lib/python3.9/site-packages/c3tt_rpc_client/client.py", line 247, in set_ticket_failed
    self._open_rpc("C3TT.setTicketFailed", ticket, [error.encode('ascii', 'xmlcharrefreplace')])
  File "/home/voc/.local/lib/python3.9/site-packages/c3tt_rpc_client/client.py", line 130, in _open_rpc
    raise C3TTException(msg) from err
c3tt_rpc_client.exceptions.C3TTException: A fault occurred
Fault code: -32500
Fault string: Database error
jbeyerstedt commented 1 week ago

Other error, if worker operates on the encoding ticket and not on the recording ticket:

root - DEBUG {depublish.py:116} creating C3TTClient
root - INFO {depublish.py:216} requesting ticket from tracker
root - DEBUG {client.py:85} creating XML RPC proxy: https://tracker.c3voc.de/rpc?group=Vz6WN6ZSD48EPWFBYMtNZDEhRxqyaqBD&hostname=releasing.c3voc.de
root - DEBUG {client.py:120} C3TT.assignNextUnassignedForState['encoding', 'removing', {'EncodingProfile.IsMaster': 'yes'}, '943251a4d405177049bc8ac43cb2bbbb7ad112d967b24fc55dc22e8a9c1c4bd9']
root - INFO {depublish.py:224} Ticket ID:144889
root - DEBUG {client.py:85} creating XML RPC proxy: https://tracker.c3voc.de/rpc?group=Vz6WN6ZSD48EPWFBYMtNZDEhRxqyaqBD&hostname=releasing.c3voc.de
root - DEBUG {client.py:120} C3TT.getTicketProperties[144889, '77a9d4fd34366340ddf567082200300bf64587694cb782d61771b8ddfd4d066a']
root - DEBUG {depublish.py:227} Ticket Properties: {'Encoding.Basename': 'jh24-hh-123-deu-Abschlusspraesentation_Hamburg', 'Encoding.Language': 'deu', 'Encoding.LanguageTemplate': 'jh24-hh-123-%s-Abschlusspraesentation_Hamburg', 'EncodingProfile.Basename': 'jh24-hh-123-deu-Abschlusspraesentation_Hamburg_hd', 'EncodingProfile.Extension': 'mp4', 'EncodingProfile.IsMaster': 'yes', 'EncodingProfile.MirrorFolder': 'h264-hd', 'EncodingProfile.Slug': 'hd', 'Fahrplan.Abstract': 'Alle Projekte werden auf der großen Bühne vorgestellt.', 'Fahrplan.Date': '2024-09-22', 'Fahrplan.DateTime': '2024-09-22T13:30:00+0200', 'Fahrplan.Day': '3', 'Fahrplan.Duration': '01:00', 'Fahrplan.GUID': 'e3f109fa-44e6-55b9-9651-977fae50e71d', 'Fahrplan.ID': 123, 'Fahrplan.Language': 'de', 'Fahrplan.Person_list': 'Anna, Hanno', 'Fahrplan.Persons': 'Anna, Hanno', 'Fahrplan.Recording.Optout': '0', 'Fahrplan.Room': 'betahaus-buehne', 'Fahrplan.Slug': 'jhhh24-123-abschlussprsentation-hamburg', 'Fahrplan.Start': '13:30', 'Fahrplan.Title': 'Abschlusspräsentation Hamburg', 'Fahrplan.Track': 'Präsentationen', 'Fahrplan.Type': 'Präsentationen', 'Fahrplan.URL': 'https://fahrplan.alpaka.space/jhhh24/talk/GX9SYX/', 'Meta.License': 'Licensed to the public under https://creativecommons.org/licenses/by-sa/4.0/', 'Meta.Year': '2024', 'Processing.Auphonic.Enable': 'no', 'Processing.BasePath': '/video', 'Processing.File.Intro': '/video/intros/jh24-hh//123.ts', 'Processing.File.Outro': '/video/intros/jh24-hh/outro.ts', 'Processing.Framerate': '25', 'Processing.Intro.Duration': '9.952656', 'Processing.Loudnorm.Enable': 'no', 'Processing.MasterMe.Enable': 'yes', 'Processing.Path.Intros': '/video/intros/jh24-hh/', 'Processing.Path.Outro': '/video/intros/jh24-hh/outro.ts', 'Processing.UseAuphonic': 'yes', 'Processing.Video.AspectRatio': '16:9', 'Project.Slug': 'jh24-hh', 'Publishing.Media.EnableProfile': 'yes', 'Publishing.Media.MimeType': 'video/mp4', 'Publishing.Path': '/video/encoded/jugendhackt/', 'Publishing.Upload.SkipSlaves': 'speedy,tweety,blade1,blade2,blade3,blade4', 'Publishing.UploadTarget': 'upload@releasing.c3voc.de:/video/encoded/jugendhackt/', 'Publishing.Voctoweb.Enable': 'yes', 'Publishing.Voctoweb.EnableProfile': 'yes', 'Publishing.Voctoweb.MimeType': 'video/mp4', 'Publishing.Voctoweb.Path': '/cdn.media.ccc.de/events/jugendhackt/2024/', 'Publishing.Voctoweb.Slug': 'jh24', 'Publishing.Voctoweb.Thumbpath': '/static.media.ccc.de/events/jugendhackt/2024/', 'Publishing.YouTube.Category': '27', 'Publishing.YouTube.Enable': 'yes', 'Publishing.YouTube.EnableProfile': 'yes', 'Publishing.YouTube.Privacy': 'public', 'Publishing.YouTube.TitleSuffix': ' | Jugend hackt Hamburg 2024', 'Publishing.YouTube.Token': '<redacted>', 'Record.Cutdiffseconds': '3354.88', 'Record.Cutin': '10', 'Record.Cutinseconds': '0.4', 'Record.Cutout': '83882', 'Record.Cutoutseconds': '3355.28', 'Record.DurationFrames': '90000', 'Record.DurationSeconds': '3600', 'Record.EndPadding': '0', 'Record.Language': 'deu', 'Record.Language.0': 'deu', 'Record.MountCmd': ' /usr/bin/fuse-ts p="betahaus-buehne-" c="/video/capture/jh24-hh/" st="2024-09-22_13-30-00" numfiles=21 totalframes=90000  -oallow_other,use_ino "/video/fuse//jh24-hh/betahaus-buehne/123" ', 'Record.Room': 'betahaus-buehne', 'Record.StartPadding': '0', 'Voctoweb.EventId': '14071', 'Voctoweb.RecordingId.Master': '80002', 'YouTube.Url0': 'https://www.youtube.com/watch?v=P9z-c6m7wuY'}
Ticket - WARNING {ticket_module.py:67} optional property 'Meta.Acronym' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Meta.Acronym' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Encoding.LanguageIndex' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Encoding.LanguageIndex' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Fahrplan.Subtitle' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Fahrplan.Subtitle' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Fahrplan.Links' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Fahrplan.Links' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Fahrplan.Description' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Fahrplan.Description' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Publishing.Thumbnail.PathOverride' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Publishing.Thumbnail.PathOverride' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Publishing.Tags' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Publishing.Tags' = None
Ticket - WARNING {ticket_module.py:62} optional property 'Publishing.YouTube.Update' was not in ticket, trying default
Ticket - DEBUG {ticket_module.py:70} 'Publishing.YouTube.Update' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Publishing.YouTube.TitlePrefix' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Publishing.YouTube.TitlePrefix' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Publishing.YouTube.TranslationTitlePrefix' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Publishing.YouTube.TranslationTitlePrefix' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Publishing.YouTube.TitlePrefixSpeakers' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Publishing.YouTube.TitlePrefixSpeakers' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Publishing.YouTube.TitleAppendSpeakers' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Publishing.YouTube.TitleAppendSpeakers' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Publishing.YouTube.TranslationTitleSuffix' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Publishing.YouTube.TranslationTitleSuffix' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Publishing.YouTube.Playlists' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Publishing.YouTube.Playlists' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Publishing.YouTube.Tags' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Publishing.YouTube.Tags' = None
Ticket - WARNING {ticket_module.py:62} optional property 'Publishing.YouTube.PublishAt' was not in ticket, trying default
Ticket - DEBUG {ticket_module.py:70} 'Publishing.YouTube.PublishAt' = None
Ticket - WARNING {ticket_module.py:67} optional property 'Publishing.Voctoweb.Tags' was not in ticket
Ticket - DEBUG {ticket_module.py:70} 'Publishing.Voctoweb.Tags' = None
Ticket - WARNING {ticket_module.py:62} optional property 'Publishing.Rclone.Enable' was not in ticket, trying default
Ticket - DEBUG {ticket_module.py:70} 'Publishing.Rclone.Enable' = False
Ticket - WARNING {ticket_module.py:62} optional property 'Publishing.Webhook.Url' was not in ticket, trying default
Ticket - DEBUG {ticket_module.py:70} 'Publishing.Webhook.Url' = None
Ticket - WARNING {ticket_module.py:62} optional property 'Publishing.Twitter.Enable' was not in ticket, trying default
Ticket - DEBUG {ticket_module.py:70} 'Publishing.Twitter.Enable' = False
Ticket - WARNING {ticket_module.py:62} optional property 'Publishing.Mastodon.Enable' was not in ticket, trying default
Ticket - DEBUG {ticket_module.py:70} 'Publishing.Mastodon.Enable' = True
Ticket - WARNING {ticket_module.py:62} optional property 'Publishing.Bluesky.Enable' was not in ticket, trying default
Ticket - DEBUG {ticket_module.py:70} 'Publishing.Bluesky.Enable' = True
Ticket - WARNING {ticket_module.py:62} optional property 'Publishing.Googlechat.Webhook' was not in ticket, trying default
Ticket - DEBUG {ticket_module.py:70} 'Publishing.Googlechat.Webhook' = None
root - DEBUG {depublish.py:144}  project media flag: True
Voctoweb - INFO {voctoweb_client.py:321} querying event info on upload.media.ccc.de
Voctoweb - DEBUG {voctoweb_client.py:326} api url: upload.media.ccc.deevents header: {'CONTENT-TYPE': 'application/json'} slug: jhhh24-123-abschlussprsentation-hamburg
root - DEBUG {depublish.py:157} #youtube True
root - DEBUG {depublish.py:163} #youtube True
root - DEBUG {depublish.py:243} depublishing to youtube
root - DEBUG {depublish.py:178} #done
root - DEBUG {client.py:85} creating XML RPC proxy: https://tracker.c3voc.de/rpc?group=Vz6WN6ZSD48EPWFBYMtNZDEhRxqyaqBD&hostname=releasing.c3voc.de
root - DEBUG {client.py:120} C3TT.setTicketFailed[144889, b'Removal from voctoweb failed:\nTraceback (most recent call last):\n  File "/home/voc/publishing/voctopublish/depublish.py", line 149, in depublish\n    self._depublish_from_voctoweb()\n  File "/home/voc/publishing/voctopublish/depublish.py", line 198, in _depublish_from_voctoweb\n    event = vw.get_event()\n  File "/home/voc/publishing/voctopublish/api_client/voctoweb_client.py", line 337, in get_event\n    self.frontend_url + "/public/events/" + self.t.voctoweb_event_id,\nTypeError: unsupported operand type(s) for +: \'NoneType\' and \'str\'\n\nRemoval from youtube failed:\nTraceback (most recent call last):\n  File "/home/voc/publishing/voctopublish/depublish.py", line 172, in depublish\n    urls = self._depublish_from_youtube()\n  File "/home/voc/publishing/voctopublish/depublish.py", line 245, in _depublish_from_youtube\n    yt = YoutubeAPI(\nTypeError: __init__() missing 2 required positional arguments: \'client_id\' and \'secret\'\n', '3fd4ac677b720d6a56ed028e1fde22f19a866e850797afa811e5426f31448d9c']