﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33081	TypeError: scandir: path should be string, bytes, os.PathLike or None, not function	Marco Rizk	nobody	"When using a FilePathField as follows

{{{

def chunk_path():
    return os.path.join(settings.MEDIA_ROOT, 'footage/chunks')

file = models.FilePathField(path=chunk_path, max_length=200)

}}}

I get the error stack of

{{{
  File ""xxxxxxx/venv/lib/python3.6/site-packages/django/forms/fields.py"", line 1126, in __init__
    for f in os.scandir(self.path):
TypeError: scandir: path should be string, bytes, os.PathLike or None, not function
}}}

"	Bug	closed	Forms	3.2	Normal	invalid			Unreviewed	0	0	0	0	0	0
