Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.8.3 : Problème de chemin transcription en microservice #1258

Open
fanfounet opened this issue Jan 31, 2025 · 0 comments
Open

3.8.3 : Problème de chemin transcription en microservice #1258

fanfounet opened this issue Jan 31, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@fanfounet
Copy link
Collaborator

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

@fanfounet fanfounet added the bug Something isn't working label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant