Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 388
    • Issues 388
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhale
  • funkwhalefunkwhale
  • Issues
  • #1147

Closed
Open
Created Jun 02, 2020 by petitminion@petitminionMaintainer

AttributeError when trying to import with import_files

hello, I'm not sure if this is a bug or my config but when i run the following command I get an error message

python api/manage.py import_files library_id "/var/www/funkwhale/import/music/" --recursive --noinput --in-place

2020-06-02 16:08:01,802 funkwhale_api.config INFO     Loaded env file at /var/www/funkwhale/code/config/.env
2020-06-02 16:08:01,802 funkwhale_api.config INFO     Running with no plugins
For details, please refer to import reference 'cli-2020-06-02T14:08:03.098389+00:00' or URL https://audio.gafamfree.party/library/164dd45a-60b2-473b-8319-252d68d1a18b/upload?import=cli-2020-06-02T14%3A08%3A03.098389%2B00%3A00
Traceback (most recent call last):
  File "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 installed funkwhale with yunohost. I created a symlink between /var/www/funkwhale/import and /mnt/ddi/funkwhale/

Just yesterday I make the import work with this command : python api/manage.py import_files library_id '/var/www/funkwhale/import/music/'* --recursive --noinput --in-place but it doesn't work anymore..

thx :)

Assignee
Assign to
Time tracking