Open
Description
Il me semble qu'il y a un problème de définition de chemin
`def start_transcripting_task(self, video_id, mp3filepath, duration, lang):
"""Start the transcripting of the video."""
from .transcript_model import start_transcripting
from ..main.settings import MEDIA_ROOT
print("Start the transcripting of the video %s" % video_id)
print(video_id, mp3filepath, duration, lang)
msg, text_webvtt = start_transcripting(mp3filepath, duration, lang)
print("End of the transcripting of the video")
media_temp_dir = os.path.join(MEDIA_ROOT, "temp")
if not os.path.exists(media_temp_dir):
os.mkdir(media_temp_dir)
temp_vtt_file = NamedTemporaryFile(dir=media_temp_dir, delete=False, suffix=".vtt")
text_webvtt.save(temp_vtt_file.name)
print("End of the transcoding of the video")
Headers = {"Authorization": "Token %s" % POD_API_TOKEN}
url = POD_API_URL.strip("/") + "/store_remote_transcripted_video/?id=%s" % video_id
data = {"video_id": video_id, "msg": msg, "temp_vtt_file": temp_vtt_file.name}
msg = "Task id : %s\n" % self.request.id`
Si j'ai défini MEDIA_ROOT dans mon fichier de config local, il va écrire le fichier temporaire dans le chemin d'installation de pod / media/temp mais au moment de transférer en rest le fichier, là il veut MEDIA_ROOT/temp