diff --git a/api/funkwhale_api/music/management/commands/import_files.py b/api/funkwhale_api/music/management/commands/import_files.py
index ddc598d06fcf5dfa50ac1508c90e563c59cf6a0e..e03c9a720ad8e4d841cf847399cdc2e60c8400eb 100644
--- a/api/funkwhale_api/music/management/commands/import_files.py
+++ b/api/funkwhale_api/music/management/commands/import_files.py
@@ -37,7 +37,7 @@ def crawl_dir(dir, extensions, recursive=True, ignored=[]):
                             yield entry.path
             elif recursive and entry.is_dir():
                 yield from crawl_dir(
-                    entry, extensions, recursive=recursive, ignored=ignored
+                    entry.path, extensions, recursive=recursive, ignored=ignored
                 )
     finally:
         if hasattr(scanner, "close"):
diff --git a/changes/changelog.d/1155.bugfix b/changes/changelog.d/1155.bugfix
new file mode 100644
index 0000000000000000000000000000000000000000..e67ec0d74a49faebe6d603dd83c52fe29dd04b87
--- /dev/null
+++ b/changes/changelog.d/1155.bugfix
@@ -0,0 +1 @@
+Fixed crash on python 3.5 with cli importer (#1155)