pytaglib icon indicating copy to clipboard operation
pytaglib copied to clipboard

OSError: Could not read file name.flac

Open donlombardo opened this issue 2 years ago • 9 comments

On the latest Linux Mint xfce, converting 24/44100 wav extracted with Reaper to flac with SoundConverter, I get this error when trying o read it.

Traceback (most recent call last): File "retageq.py", line 38, in tagged = taglib.File("name.flac") File "src/taglib.pyx", line 87, in taglib.File.cinit OSError: Could not read file name.flac

It used to work in Xubuntu.

Install:

pip3 install pytaglib Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: pytaglib in /home/andre/.local/lib/python3.8/site-packages (1.5.0)

libtag1-dev is already the newest version (1.11.1+dfsg.1-0.3ubuntu2).

What can I do?

donlombardo avatar May 05 '22 16:05 donlombardo

Did you check the file's permissions? (ls -l name.flac)?

supermihi avatar May 28 '22 17:05 supermihi

Here they are: -rw-rw-r-- Is there something wrong with this?

Den lör 28 maj 2022 kl 19:58 skrev Michael Helmling < @.***>:

Did you check the file's permissions? (ls -l name.flac)?

— Reply to this email directly, view it on GitHub https://github.com/supermihi/pytaglib/issues/103#issuecomment-1140305689, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHZRPSJFXIAQMRCKV5VJWEDVMJNCZANCNFSM5VFVHVDA . You are receiving this because you authored the thread.Message ID: @.***>

donlombardo avatar Jun 01 '22 19:06 donlombardo

Hi @donlombardo, no, that looks absolutely okay. To be honest, I have no idea what's going on – are other tagging tools able to read the file?

supermihi avatar Jun 02 '22 14:06 supermihi

I'm sorry for my very late reply. Tes, Puddletag for example reads it just fine. Flac test.zip

I've put together a small example that doesn't work for me. Output is: Traceback (most recent call last): File "tag.py", line 2, in <module> foo = taglib.File("Test.flac") File "src/taglib.pyx", line 87, in taglib.File.__cinit__ OSError: Could not read file Test.flac

donlombardo avatar Aug 04 '22 20:08 donlombardo

Hi @donlombardo, thanks for uploading the file. I have tested this on my machine, where it "unfortunaely" works without problem (the tags are empty, but no error is raised). It could be something specific to the version of Linux Mint you are runnig – will try to find a Mint computer to verify that.

supermihi avatar Aug 07 '22 15:08 supermihi

Thank you for trying! It worked flawlessly on Ubuntu, so I guess you're right :)

donlombardo avatar Aug 07 '22 18:08 donlombardo

Having a same problem with .webm audio downloaded from yt-dlp, but everything works with a .m4a downloaded from a same video. I'm using Arch Linux with Python 3.10.9, pytaglib 2.0.0 and taglib 1.13-1. Commands that i'm using to download audio are:

yt-dlp -f 251 "https://www.youtube.com/watch?v=fWNaR-rxAic"
yt-dlp -f 140 "https://www.youtube.com/watch?v=fWNaR-rxAic"

cheloveg avatar Apr 12 '23 08:04 cheloveg