# Musiclibrary.blb cannot not be opened

**URL:** <https://discourse.beets.io/t/musiclibrary-blb-cannot-not-be-opened/1544>\
**Category:** Help\
**Created:** [October 16, 2020, 9:00pm UTC](https://discourse.beets.io/t/musiclibrary-blb-cannot-not-be-opened/1544 "2020-10-16T21:00:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirill](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@kirill](https://discourse.beets.io/u/kirill)\
**Post date:** [October 16, 2020, 9:00pm UTC](https://discourse.beets.io/t/musiclibrary-blb-cannot-not-be-opened/1544/1 "2020-10-16T21:00:48Z")

</div>

Can someone help with docker import problem?

When I run `beet import /downloads` i get this error `musiclibrary.blb cannot not be opened: unable to open database file.` What could be causing the problem?

I am using Linux server docker image and can see the files in the config folder from within the container. using the same uid and gid. I have deleted the musiclibrary.blb file and restarted the docker image with no joy.

Any ideas?

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [October 16, 2020, 10:17pm UTC](https://discourse.beets.io/t/musiclibrary-blb-cannot-not-be-opened/1544/2 "2020-10-16T22:17:19Z")

</div>

Hello! This is a problem with the configuration of your Docker container. You might start by trying to change the beets configuration option that controls where your database file is located:

> **[Configuration — beets 1.4.9 documentation](https://beets.readthedocs.io/en/stable/reference/config.html#library)**

---

<div class="post-metadata">

**Author:** ![kirill](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@kirill](https://discourse.beets.io/u/kirill)\
**Post date:** [January 9, 2021, 8:02pm UTC](https://discourse.beets.io/t/musiclibrary-blb-cannot-not-be-opened/1544/3 "2021-01-09T20:02:37Z")

</div>

Thank you for your help, your suggestion worked.

---

<div class="post-metadata">

**Author:** ![LeFab](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/lefab/32/588_2.png) [@LeFab](https://discourse.beets.io/u/LeFab)\
**Post date:** [November 1, 2021, 11:08am UTC](https://discourse.beets.io/t/musiclibrary-blb-cannot-not-be-opened/1544/4 "2021-11-01T11:08:59Z")

</div>

I tried your solution but it doesnt work for me.  
heres the very verbose output from beets docker:

LeFab@Gaston:~$ sudo docker exec -u abc -it beets /bin/bash -c ‘beet -vvv import -CAW /volume1/Musik’  
user configuration: /config/config.yaml  
data directory: /config  
plugin paths:  
/usr/lib/python3.8/site-packages/beets/mediafile.py:21: UserWarning: beets.mediafile is deprecated; use mediafile instead  
warnings.warn(“beets.mediafile is deprecated; use mediafile instead”)  
Sending event: pluginload  
lyrics: Disabling google source: no API key configured.  
inline: adding item field mySongartist  
inline: adding item field isMultidisc  
inline: adding item field myAlbumType  
inline: adding item field myDisc  
inline: adding album field bitrate  
Traceback (most recent call last):  
File “/usr/lib/python3.8/site-packages/beets/dbcore/db.py”, line 1020, in \_make\_table  
rows = tx.query(‘PRAGMA table\_info(%s)’ % table)  
File “/usr/lib/python3.8/site-packages/beets/dbcore/db.py”, line 863, in query  
cursor = self.db.\_connection().execute(statement, subvals)  
File “/usr/lib/python3.8/site-packages/beets/dbcore/db.py”, line 947, in \_connection  
conn = self.\_create\_connection()  
File “/usr/lib/python3.8/site-packages/beets/library.py”, line 1439, in \_create\_connection  
conn = super(Library, self).\_create\_connection()  
File “/usr/lib/python3.8/site-packages/beets/dbcore/db.py”, line 961, in \_create\_connection  
conn = sqlite3.connect(  
sqlite3.OperationalError: unable to open database file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/usr/lib/python3.8/site-packages/beets/ui/ **init**.py”, line 1221, in \_open\_library  
lib = library.Library(  
File “/usr/lib/python3.8/site-packages/beets/library.py”, line 1430, in **init**  
super(Library, self). **init** (path, timeout=timeout)  
File “/usr/lib/python3.8/site-packages/beets/dbcore/db.py”, line 933, in **init**  
self.\_make\_table(model\_cls.\_table, model\_cls.\_fields)  
File “/usr/lib/python3.8/site-packages/beets/dbcore/db.py”, line 1020, in \_make\_table  
rows = tx.query(‘PRAGMA table\_info(%s)’ % table)  
File “/usr/lib/python3.8/site-packages/beets/dbcore/db.py”, line 855, in **exit**  
self.db.\_connection().commit()  
File “/usr/lib/python3.8/site-packages/beets/dbcore/db.py”, line 947, in \_connection  
conn = self.\_create\_connection()  
File “/usr/lib/python3.8/site-packages/beets/library.py”, line 1439, in \_create\_connection  
conn = super(Library, self).\_create\_connection()  
File “/usr/lib/python3.8/site-packages/beets/dbcore/db.py”, line 961, in \_create\_connection  
conn = sqlite3.connect(  
sqlite3.OperationalError: unable to open database file

error: database file /volume1/homes/LeFab/.config/beets/library.db cannot not be opened: unable to open database file

 ![Screen Shot 2021-11-01 at 6.46.21 AM](https://canada1.discourse-cdn.com/flex029/uploads/beets/original/1X/049732c3df081e6588e15eeafb6d6fe98f582a9b.png)  
 ![Screen Shot 2021-10-24 at 3.32.41 PM](https://canada1.discourse-cdn.com/flex029/uploads/beets/original/1X/b62139e22138f721235317e331edad60704544c6.png)  
 ![Screen Shot 2021-11-01 at 6.50.29 AM](https://canada1.discourse-cdn.com/flex029/uploads/beets/original/1X/40d1289bb9c2825a09b48672d29e361f10da2942.png)

I have been on this for so long now it’s ridiculous… I really need help.

thanks
