Error using manager.py to import existing music collection from within Docker
I wish to have Funkwhale import a library from an existing directory, mounted at /music
from my container.
This directory contains about 150+GB of music so I don't want it duplicated.
docker exec -it Funkwhale manage import_files "<redacted>" "/music/**/*.mp3" --recursive --noinput --in-place
Traceback (most recent call last):
File "manage.py", line 20, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/app/api/funkwhale_api/music/management/commands/import_files.py", line 139, in handle
matching += glob.glob(import_path, **glob_kwargs)
File "/usr/lib/python3.6/glob.py", line 20, in glob
return list(iglob(pathname, recursive=recursive))
File "/usr/lib/python3.6/glob.py", line 72, in _iglob
for name in glob_in_dir(dirname, basename, dironly):
File "/usr/lib/python3.6/glob.py", line 83, in _glob1
return fnmatch.filter(names, pattern)
File "/usr/lib/python3.6/fnmatch.py", line 52, in filter
match = _compile_pattern(pat)
File "/usr/lib/python3.6/fnmatch.py", line 46, in _compile_pattern
return re.compile(res).match
File "/usr/lib/python3.6/re.py", line 233, in compile
return _compile(pattern, flags)
File "/usr/lib/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "/usr/lib/python3.6/sre_parse.py", line 855, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/lib/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "/usr/lib/python3.6/sre_parse.py", line 765, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "/usr/lib/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "/usr/lib/python3.6/sre_parse.py", line 553, in _parse
raise source.error(msg, len(this) + 1 + len(that))
sre_constants.error: bad character range e-R at position 48
Additionally, here is some information about my setup from Docker Inspect. I have removed parts that may be unnecessary to reduce length.
{
"Config": {
"Env": [
"FUNKWHALE_HOSTNAME=private.spikespaz.com",
"FUNKWHALE_PROTOCOL=http",
"DJANGO_SECRET_KEY=<redacted>",
"TZ=America/Arizona",
"PGID=1100",
"PUID=1100",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"DJANGO_SETTINGS_MODULE=config.settings.production",
"DJANGO_ALLOWED_HOSTS=127.0.0.1,*",
"DATABASE_URL=postgresql://funkwhale@:5432/funkwhale",
"MEDIA_ROOT=/data/media",
"MUSIC_DIRECTORY_PATH=/music",
"NGINX_MAX_BODY_SIZE=100M",
"STATIC_ROOT=/app/api/staticfiles",
"FUNKWHALE_SPA_HTML_ROOT=http://localhost/front/",
"MUSIC_DIRECTORY_PATH=/music"
],
"Image": "funkwhale/all-in-one:develop",
"Volumes": {
"/data": {},
"/music": {}
}
},
"HostConfig": {
"Binds": [
"/var/lib/rancher/funkwhale:/data",
"/home/rancher/Music:/music:ro"
],
"Mounts": [
{
"Destination": "/data",
"Mode": "",
"Propagation": "rprivate",
"RW": true,
"Source": "/var/lib/rancher/funkwhale",
"Type": "bind"
},
{
"Destination": "/music",
"Mode": "ro",
"Propagation": "rprivate",
"RW": false,
"Source": "/home/rancher/Music",
"Type": "bind"
}
],
"Name": "/Funkwhale"
}
}
Sorry for the second issue, I really want to be able to use Funkwhale.