python - “Lame tag CRC check failed”使用eyeD3更改mp3文件标签(Python)
问题描述
我有很多以以下格式命名的 mp3 文件:“艺术家 - 歌曲” 艺术家和歌曲都在文件的“标题”字段中。我想改变他们,让他们在各自的领域拥有艺术家和歌曲。
为此,我使用了 eyed3 python 模块。但是,当我运行我的代码时,我收到一条错误消息:“Lame tag CRC check failed”,并且没有更改任何文件属性。这是我目前拥有的代码:
import os
import eyed3
for files in os.listdir("C:/Users/justi/Desktop/New Music - Copy"):
artist_and_song = files.split(".") # Gets rid of ".mp3" suffix
split_at_dash = artist_and_song[0].split("-") # Separates artist and song
artist = split_at_dash[0]
song = split_at_dash[1]
# Loads each and every MP3
mp3 = eyed3.load("C:/Users/justi/Desktop/New Music" + '/' + files)
mp3.initTag()
mp3.tag.artist = artist
mp3.tag.title = song
mp3.tag.save()
我在 StackOverflow 的其他地方看到过这个问题,但没有一个建议的解决方案能奏效。任何帮助将不胜感激。
解决方案
推荐阅读
- python - tensorflow boolean_mask 如何在两个张量之间进行掩码?
- scala - 如何使用 Spark(使用 scala)有效地读取 Kafka 主题中的每条消息?
- animation - 将小部件添加到小部件树时如何为更改设置动画
- node.js - 使用 Node JS 在 Telegram Bot 上存储用户发送的文件
- android - 找不到“androidx.arch”、“androidx.room”等版本
- react-native - 在 React 中使用时调用本地资源
- angular - routerLink 未链接(类似于 href)
- javascript - How to display an array of messages being received from database, for a chat-room
- python-3.x - 将字典复制到多个进程是否也会复制字典中的对象?
- php - 在 WooCommerce 中向电子邮件主题添加自定义占位符