# How can I debug not being able to import youtube transcripts?

**URL:** <https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939>\
**Category:** Site Operations Help\
**Created:** [March 31, 2022, 2:02pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939 "2022-03-31T14:02:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rohan](https://discuss.openedx.org/u/Rohan)\
**Post date:** [March 31, 2022, 2:02pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939/1 "2022-03-31T14:02:08Z")

</div>

Hello. What’s the correct way to find the data necessary to help debug why the youtube transcript import button doesn’t work, so that I can provide it here? (I’m running Lilac with tutor.)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/b/bdf0566a7399a5fc14e8e1439698c3b6d0bc9c02.png)

---

<div class="post-metadata">

**Author:** ![Rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rohan](https://discuss.openedx.org/u/Rohan)\
**Post date:** [April 3, 2022, 2:19pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939/2 "2022-04-03T14:19:43Z")

</div>

I found the following in my logs,

```auto
ESC[32mcms_1 |ESC[0m [pid: 109|app: -1|req: -1/56] 172.18.0.13 () {58 vars in 2340 bytes} [Sun Apr 3 14:04:49 2022] GET /static/studio/indigo/images/favicon.e5
a6e8c56bd8.ico => generated 6119 bytes in 0 msecs via sendfile() (HTTP/1.0 200) 3 headers in 127 bytes (0 switches on core 0)
ESC[32mcms_1 |ESC[0m 2022-04-03 14:04:49,676 INFO 7 [tracking] [user 3] [ip 123.321.111.222] logger.py:41 - {"name": "/xblock/container/block-v1:site+class+version+type@vertical+block@a63cdf2a9bde418db24e426823344516", "context": {"user_id": 3, "path": "/xblock/container/block-v1:site
+class+version+type@vertical+block@a63cdf2a9bde418db24e426823344516", "course_id": "", "org_id": ""}, "username": "User", "session": "9b06ffaa632ac9442093b93
17b44ac97", "ip": "123.321.111.222", "agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36", "host": "studio.be
ta.ost2.fyi", "referer": "https://studio.foo.bar.com/container/block-v1:site+class+version+type@vertical+block@a63cdf2a9bde418db24e4268233
44516", "accept_language": "en-US,en;q=0.9", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2022-04-03T14:04:49.676012+00:00", "event_type": "/xblock/container/block-v1:
site+class+version+type@vertical+block@a63cdf2a9bde418db24e426823344516", "event_source": "server", "page": null}
ESC[32mcms_1 |ESC[0m 2022-04-03 14:04:49,746 INFO 109 [tracking] [user 3] [ip 123.321.111.222] logger.py:41 - {"name": "/preview/xblock/block-v1:site+class+version+type@video+block@56ad6f69fb174512ab1b9a4adfeba193/handler/transcript/translation/en", "context": {"user_id": 3, "path": "/preview/xblock/b
lock-v1:site+class+version+type@video+block@56ad6f69fb174512ab1b9a4adfeba193/handler/transcript/translation/en", "course_id": "", "org_id": 
""}, "username": "User", "session": "9b06ffaa632ac9442093b9317b44ac97", "ip": "123.321.111.222", "agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Ge
cko) Chrome/98.0.4758.102 Safari/537.36", "host": "studio.foo.bar.com", "referer": "https://studio.foo.bar.com/container/block-v1:site+class+version+type@vertical+block@a63cdf2a9bde418db24e426823344516", "accept_language": "en-US,en;q=0.9", "event": "{\"GET\": {\"videoId\": [\"censored\"]}, \"POST\": {}
}", "time": "2022-04-03T14:04:49.746329+00:00", "event_type": "/preview/xblock/block-v1:site+class+version+type@video+block@56ad6f69fb174512
ab1b9a4adfeba193/handler/transcript/translation/en", "event_source": "server", "page": null}
ESC[32mcms_1 |ESC[0m 2022-04-03 14:04:49,810 ERROR 109 [xmodule.video_module.video_handlers] [user 3] [ip 123.321.111.222] video_handlers.py:351 - [Translation Di
spatch] block-v1:site+class+version+type@video+block@56ad6f69fb174512ab1b9a4adfeba193
ESC[32mcms_1 |ESC[0m Traceback (most recent call last):
ESC[32mcms_1 |ESC[0m File "/openedx/edx-platform/common/lib/xmodule/xmodule/video_module/transcripts_utils.py", line 1062, in get_transcript
ESC[32mcms_1 |ESC[0m raise NotFoundError
ESC[32mcms_1 |ESC[0m xmodule.exceptions.NotFoundError
ESC[32mcms_1 |ESC[0m 
ESC[32mcms_1 |ESC[0m During handling of the above exception, another exception occurred:
ESC[32mcms_1 |ESC[0m 
ESC[32mcms_1 |ESC[0m Traceback (most recent call last):
ESC[32mcms_1 |ESC[0m File "/openedx/edx-platform/common/lib/xmodule/xmodule/video_module/video_handlers.py", line 336, in transcript
ESC[32mcms_1 |ESC[0m content, filename, mimetype = get_transcript(
ESC[32mcms_1 |ESC[0m File "/openedx/edx-platform/common/lib/xmodule/xmodule/video_module/transcripts_utils.py", line 1065, in get_transcript
ESC[32mcms_1 |ESC[0m return get_transcript_from_contentstore(
ESC[32mcms_1 |ESC[0m File "/openedx/edx-platform/common/lib/xmodule/xmodule/video_module/transcripts_utils.py", line 69, in wrapper
ESC[32mcms_1 |ESC[0m return func(*args, **kwds)
ESC[32mcms_1 |ESC[0m File "/openedx/edx-platform/common/lib/xmodule/xmodule/video_module/transcripts_utils.py", line 945, in get_transcript_from_contentstore
ESC[32mcms_1 |ESC[0m raise NotFoundError('No transcript for `{lang}` language'.format(
ESC[32mcms_1 |ESC[0m xmodule.exceptions.NotFoundError: No transcript for `en` language
ESC[32mcms_1 |ESC[0m [pid: 109|app: 0|req: 12/57] 172.18.0.13 () {58 vars in 2638 bytes} [Sun Apr 3 14:04:49 2022] GET /preview/xblock/block-v1:site+class+version+type@video+block@56ad6f69fb174512ab1b9a4adfeba193/handler/transcript/translation/en?videoId=censored => generated 0 bytes in 164 msecs (HTTP/1.0 404) 5 headers in 286 bytes (1 switches on core 0)

```

but don’t understand why it’s saying there’s no english transcript when youtube shows a transcript:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/d/dc4af1ad32bb0ab6c9b9792a15f50492afa06cf2.png)

I see this previous thread but no one replied: [Lilac broke Youtube Transcript import?](https://discuss.openedx.org/t/lilac-broke-youtube-transcript-import/6200)

---

<div class="post-metadata">

**Author:** ![mgmdi](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mgmdi/32/1684_2.png) [@mgmdi](https://discuss.openedx.org/u/mgmdi)\
**Post date:** [April 4, 2022, 1:04pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939/3 "2022-04-04T13:04:34Z")

</div>

Hi there @Rohan! 👋🏼

Have you read this [thread](https://discuss.openedx.org/t/import-youtube-transcript-not-appearing-despite-youtube-saying-i-have-one/) by chance?

---

<div class="post-metadata">

**Author:** ![Rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rohan](https://discuss.openedx.org/u/Rohan)\
**Post date:** [April 4, 2022, 1:19pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939/4 "2022-04-04T13:19:55Z")

</div>

Hi Maria. Yes. The same person who said that they got it working on Koa in the thread you cited, said it’s broken on Lilac and Maple in the [thread I cited](https://discuss.openedx.org/t/lilac-broke-youtube-transcript-import/6200), as appears to be my experience on Lilac. I did get my youtube API set up based on that thread you cited though.

---

<div class="post-metadata">

**Author:** ![mgmdi](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mgmdi/32/1684_2.png) [@mgmdi](https://discuss.openedx.org/u/mgmdi)\
**Post date:** [April 4, 2022, 3:53pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939/5 "2022-04-04T15:53:38Z")

</div>

Right, the thread already mentioned they tried that. So I’ll try to reproduce this error in my local env to see if there’s something I can do to fix it. I’ll keep you posted!

---

<div class="post-metadata">

**Author:** ![Rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rohan](https://discuss.openedx.org/u/Rohan)\
**Post date:** [April 4, 2022, 4:09pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939/6 "2022-04-04T16:09:58Z")

</div>

That would be fabulous! Thank you!

---

<div class="post-metadata">

**Author:** ![mgmdi](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mgmdi/32/1684_2.png) [@mgmdi](https://discuss.openedx.org/u/mgmdi)\
**Post date:** [April 4, 2022, 4:57pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939/7 "2022-04-04T16:57:21Z")

</div>

I have good and not-so-good news for this issue.

The good 😄  
I found [this issue](https://github.com/appsembler/xblock-video/issues/48) opened last year in the Video block, it seems to be your exact problem!

The not-so-good 😅  
It doesn’t look that straightforward to solve.

Hello there @Evgen_Dyudyunov! How did you fix this problem in your installation?

---

<div class="post-metadata">

**Author:** ![Evgen\_Dyudyunov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/evgen_dyudyunov/32/3702_2.png) [@Evgen\_Dyudyunov](https://discuss.openedx.org/u/Evgen_Dyudyunov)\
**Post date:** [April 4, 2022, 9:06pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939/8 "2022-04-04T21:06:02Z")

</div>

Hi there!  
All I have for this issue is collected in the mentioned by Maria GitHub Issue. Long story short: this doesn’t seem to be connected to open edx or video-xblock updates. The root of the problem is in the YouTube APIs. As a solution – need to rework the transcripts functionality according to the new YouTube API (I have no ready-to-use solution)

---

<div class="post-metadata">

**Author:** ![Rohan](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rohan](https://discuss.openedx.org/u/Rohan)\
**Post date:** [April 5, 2022, 12:03pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939/9 "2022-04-05T12:03:05Z")

</div>

I’m glad to learn it’s not just me who had the issue…but of course it’s disheartening to know it’s a fundamental bug that hasn’t been fixed and probably won’t be fixed for a long long time since it requires a lot of work.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/e/e0015f89e879bc75925b71fd11133ab15fe98297.png) [@system](https://discuss.openedx.org/u/system)\
**Post date:** [July 4, 2022, 12:03pm UTC](https://discuss.openedx.org/t/how-can-i-debug-not-being-able-to-import-youtube-transcripts/6939/10 "2022-07-04T12:03:48Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
