# When processing a song fails a temp directory is left

**URL:** <https://community.mp3tag.de/t/when-processing-a-song-fails-a-temp-directory-is-left/51904>\
**Category:** Mac\
**Tags:** bug-fixed\
**Created:** [February 7, 2021, 7:36pm UTC](https://community.mp3tag.de/t/when-processing-a-song-fails-a-temp-directory-is-left/51904 "2021-02-07T19:36:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AvidMusicRenamer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@AvidMusicRenamer](https://community.mp3tag.de/u/AvidMusicRenamer)\
**Post date:** [February 7, 2021, 7:36pm UTC](https://community.mp3tag.de/t/when-processing-a-song-fails-a-temp-directory-is-left/51904/1 "2021-02-07T19:36:26Z")

</div>

When mp3tag fails to process a song a temp directory is created and left hanging around.

Error:

> **Cannot write tags to file "01 Bullet Catch.m4a" in folder "Bullet Catch - Single"**

Directories created:

> 01 Bullet Catch.m4a.sb-e612fab9-9BPbXm  
> 01 Bullet Catch.m4a.sb-e612fab9-hjrZKb  
> 01 Bullet Catch.m4a.sb-e612fab9-HNUr2s  
> 01 Bullet Catch.m4a.sb-e612fab9-vMVEqG

Is there anyway to have to have it remove the directories it creates after a processing failure?

Thanks.

---

<div class="post-metadata">

**Author:** ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)\
**Post date:** [February 7, 2021, 8:17pm UTC](https://community.mp3tag.de/t/when-processing-a-song-fails-a-temp-directory-is-left/51904/2 "2021-02-07T20:17:40Z")

</div>

Thanks! Do you know what caused Mp3tag to not be able to write to the file?

---

<div class="post-metadata">

**Author:** ![AvidMusicRenamer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@AvidMusicRenamer](https://community.mp3tag.de/u/AvidMusicRenamer)\
**Post date:** [February 7, 2021, 9:15pm UTC](https://community.mp3tag.de/t/when-processing-a-song-fails-a-temp-directory-is-left/51904/3 "2021-02-07T21:15:33Z")

</div>

I actually don't know. Is there a way to debug this if I wanted to find out? My music collection is all purchased music from iTunes. I re-downloaded the album from iTunes and it was able to process it but that doesn't really tell me why mp3tag is having issues.

Thanks.

---

<div class="post-metadata">

**Author:** ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)\
**Post date:** [February 8, 2021, 7:28am UTC](https://community.mp3tag.de/t/when-processing-a-song-fails-a-temp-directory-is-left/51904/4 "2021-02-08T07:28:26Z")

</div>

I thought that it's caused by another process locking the file and was interested in the circumstances.

If it's a specific file that causing trouble, it's always possible to send me the file for analyzing purposes.

---

<div class="post-metadata">

**Author:** ![AvidMusicRenamer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@AvidMusicRenamer](https://community.mp3tag.de/u/AvidMusicRenamer)\
**Post date:** [February 8, 2021, 11:13am UTC](https://community.mp3tag.de/t/when-processing-a-song-fails-a-temp-directory-is-left/51904/5 "2021-02-08T11:13:48Z")

</div>

I ended up running exiftool with a find across my entire collection of music and it turns out iTunes has been randomly sending me a DRM protected file which was causing mp3tag to fail. I'm having to go back to iTunes and re-download the songs that were sent with DRM. None of the music I buy from iTunes should have DRM. This fixes the issue I was seeing.

> find . -name "\*m4a" -exec exiftool -a {} ; | egrep -e "Audio Format|Directory|File Name" | grep drms -B3

Thanks again for the help.

---

<div class="post-metadata">

**Author:** ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)\
**Post date:** [February 10, 2021, 1:34pm UTC](https://community.mp3tag.de/t/when-processing-a-song-fails-a-temp-directory-is-left/51904/6 "2021-02-10T13:34:06Z")

</div>

I've fixed this with Beta 12. Thanks for reporting!

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [March 12, 2021, 1:34pm UTC](https://community.mp3tag.de/t/when-processing-a-song-fails-a-temp-directory-is-left/51904/7 "2021-03-12T13:34:56Z")

</div>

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