Error when running #12

Closed
opened 2026-10-05 06:12:31 +02:00 by adam · 2 comments
Owner

Hello,

I successfully ran youtube2peertube.py on my Linux Mint 18.3 Sylvia. It copied the videos on my Peertube channel.

Then I added a second channel in the config.toml.

Then I tried to run it again (30 minutes after the 1st time) and I encountered this error:

Traceback (most recent call last):
File "./youtube2peertube.py", line 323, in
run(run_once=False)
File "./youtube2peertube.py", line 319, in run
run_steps(conf)
File "./youtube2peertube.py", line 271, in run_steps
video_data = get_video_data(channel_id)
File "./youtube2peertube.py", line 18, in get_video_data
channel_lang = feed["feed"]["title_detail"]["language"]
File "/usr/local/lib/python3.6/site-packages/feedparser.py", line 356, in getitem
return dict.getitem(self, key)
KeyError: 'title_detail'

Could you tell me why?

Hello, I successfully ran youtube2peertube.py on my Linux Mint 18.3 Sylvia. It copied the videos on my Peertube channel. Then I added a second channel in the config.toml. Then I tried to run it again (30 minutes after the 1st time) and I encountered this error: > Traceback (most recent call last): > File "./youtube2peertube.py", line 323, in <module> > run(run_once=False) > File "./youtube2peertube.py", line 319, in run > run_steps(conf) > File "./youtube2peertube.py", line 271, in run_steps > video_data = get_video_data(channel_id) > File "./youtube2peertube.py", line 18, in get_video_data > channel_lang = feed["feed"]["title_detail"]["language"] > File "/usr/local/lib/python3.6/site-packages/feedparser.py", line 356, in __getitem__ > return dict.__getitem__(self, key) > KeyError: 'title_detail' > Could you tell me why? <!-- github-sync-id:546052861 -->
adam closed this issue 2026-10-05 06:12:31 +02:00
Author
Owner

It is because you have the wrong YT channel ID in the configuration file. The tool is trying to set the language of the channel based on information in the channel, and it is not getting that information. Double check the YT channel ID for the channel you recently added, you may be missing a character, have an extra character, be using a video ID or something like that. try going to https://www.youtube.com/feeds/videos.xml?channel_id=<channel_id> and see if it goes to the channel, if not, get the channel ID again and put it in the config.

I am closing this but feel free to add another comment if you double check it and still face this problem.

It is because you have the wrong YT channel ID in the configuration file. The tool is trying to set the language of the channel based on information in the channel, and it is not getting that information. Double check the YT channel ID for the channel you recently added, you may be missing a character, have an extra character, be using a video ID or something like that. try going to https://www.youtube.com/feeds/videos.xml?channel_id=<channel_id> and see if it goes to the channel, if not, get the channel ID again and put it in the config. I am closing this but feel free to add another comment if you double check it and still face this problem. <!-- github-comment-id:571421506 -->
Author
Owner

You were right, I tried with another YT channel and it worked fine. Thks for this tool.

You were right, I tried with another YT channel and it worked fine. Thks for this tool. <!-- github-comment-id:571426934 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/YouTube2PeerTube#12