Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7041527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:03:23+00:00 2026-05-28T02:03:23+00:00

I am attempting to edit certain MP3 files ID3 tags through Python. I have

  • 0

I am attempting to edit certain MP3 files ID3 tags through Python. I have done some research, and found the mutagen, and eyeD3 libraries. However, I have run into similar issues with both of these libraries. Both implementations complain that the file I’m providing either does not exist, or is not an .mp3 file.

I have downloaded Mp3tag (http://www.mp3tag.de/en/download.html) and confirmed that the file I am providing is Tagged as ID3v2.3(ID3v1 ID3v2.3) and that is an .mp3 file.

Below is the mutagen code, followed by the error I receive:

from mutagen.mp3 import MP3

audio = MP3("C:\Users\557319\Music\Trance\Paul van Dyk - We Come Together (Arty Remix)")
print audio.info.length, audio.info.bitrate

Traceback (most recent call last):
  File "<pyshell#14>", line 1, in <module>
    audio = MP3("C:\Users\557319\Music\Trance\Paul van Dyk - We Come Together (Arty Remix)  www.freshnewtracks.com.mp3")
  File "C:\Python27\lib\site-packages\mutagen\__init__.py", line 75, in __init__
    self.load(filename, *args, **kwargs)
  File "C:\Python27\lib\site-packages\mutagen\id3.py", line 1995, in load
    try: self.tags = ID3(filename, **kwargs)
  File "C:\Python27\lib\site-packages\mutagen\id3.py", line 74, in __init__
super(ID3, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\site-packages\mutagen\_util.py", line 105, in __init__
    super(DictProxy, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\site-packages\mutagen\__init__.py", line 39, in __init__
    self.load(*args, **kwargs)
  File "C:\Python27\lib\site-packages\mutagen\id3.py", line 109, in load
    self.__fileobj = file(filename, 'rb')
IOError: [Errno 2] No such file or directory: 'C:\\Userso319\\Music\\Trance\\Paul van Dyk - We Come Together (Arty Remix) www.freshnewtracks.com.mp3'

Now when I try to view the ID3 data using eyeD3, I experience the following:

import eyeD3

trackInfo = eyeD3.Mp3AudioFile("C:\Users\557319\Music\Trance\Paul van Dyk - We Come Together (Arty Remix) www.freshnewtracks.com")

Traceback (most recent call last):
  File "<pyshell#12>", line 1, in <module>
trackInfo = eyeD3.Mp3AudioFile("C:\Users\557319\Music\Trance\Paul van Dyk - We Come Together (Arty Remix) www.freshnewtracks.com")
  File "C:\Python27\lib\site-packages\eyeD3\tag.py", line 1618, in __init__
    raise InvalidAudioFormatException("File is not mp3");
InvalidAudioFormatException: File is not mp3

My guess is that I am not viewing the file properly? Do I need to use some type of os library to properly view these files ID3 data for Windows 7? Any help is greatly appreciated.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:03:24+00:00Added an answer on May 28, 2026 at 2:03 am

    When you deal with Windows paths in Python, you have three options:

    • escape all backslashes with an additional one ("C:\\mydir\\myfile.mp3")
    • specify it as a “raw” string (r'C:\mydir\myfile.mp3' — note the initial “r”)
    • use forward-slashes. Some libs might not like it.

    Whenever you manipulate paths, you should always use the functions in the os.path module, e.g. os.path.join(r'C:\mydir','myfile.mp3')

    (as an aside, note that ID3 libs like mutagen are known for being buggy and temperamental, so expect breakages or weird behaviour; this is unfortunately due to ID3 being a poorly-specified non-standard full of corner cases and strange implementations.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT After some more research I found that I cannot use a continuous form
I have not done much database programming at all. I am working from some
I am attempting to edit some resources in another .NET executable, using reflection. Is
I have noticed while monitoring/attempting to answer common jQuery questions, that there are certain
-Edit: Solution Found- Figured it out after some heavy searching - one person (I
NEWEST EDIT!!! PLEASE... I have been through many permutations of this code. I am
EDIT -- Answered below, missed the angled braces. Thanks all. I have been attempting
I'm attempting to edit the registry with C++ and this is my first time
I am attempting to edit the default file located at .. /etc/apache2/sites-available/default on my
Not long ago I asked a question attempting to identify a certain unicode character

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.