hello,
I’m trying to import music to funkwhale.
- I created a symlink between /mnt/mymusic and /var/www/funkwhale/import.
- Then :
cd /var/www/funkwhale
source code/virtualenv/bin/activate
python code/api/manage.py import_files <your library id> /var/funkwhale/import/mymusic --noinput --in-place --recursive
but I get this error :
2020-05-31 19:23:53,698 funkwhale_api.config INFO Loaded env file at /var/www/funkwhale/code/config/.env
2020-05-31 19:23:53,699 funkwhale_api.config INFO Running with no plugins
Checking imported paths against settings.MUSIC_DIRECTORY_PATH
For details, please refer to import reference 'cli-2020-05-31T17:23:54.967312+00:00' or URL https://fw.url/library/164dd45a-60b2-473b-8319-252d68d1a18b/upload?import=cli-2020-05-31T17%3A23%3A54.967312%2B00%3A00
Traceback (most recent call last):
File "code/api/manage.py", line 27, in <module>
execute_from_command_line(sys.argv)
File "/var/www/funkwhale/code/virtualenv/lib/python3.5/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/var/www/funkwhale/code/virtualenv/lib/python3.5/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/www/funkwhale/code/virtualenv/lib/python3.5/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/var/www/funkwhale/code/virtualenv/lib/python3.5/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/var/www/funkwhale/code/api/funkwhale_api/music/management/commands/import_files.py", line 217, in handle
for i, entries in enumerate(batch(crawler, options["batch_size"])):
File "/var/www/funkwhale/code/api/funkwhale_api/music/management/commands/import_files.py", line 34, in batch
current.append(next(iterable))
File "/var/www/funkwhale/code/api/funkwhale_api/music/management/commands/import_files.py", line 18, in crawl_dir
with os.scandir(dir) as scanner:
AttributeError: __exit__
I remember this worked before last update (0.21)
I don’t know how to debug this :s