If I use jupyterlab for my text editor, it creates some cache files like pages/.ipynb_checkpoints/my_page.py. When dash scans the pages directory for .py files, these get included, resulting in Duplicate Callback errors. I imagine similar things can happen with other text editors too.
Is there an easy way to exclude hidden files and folders from the scan?
While I think hidden files should just be excluded by default, maybe this is the right time to suggest allowing some even more flexible structure instead of forcing the pages directory.
from glob import glob
my_pages=glob('pages/**/*.py',recursive=True)
app= dash.Dash(use_pages=my_pages)
It does search for .py files recursively, so it’s possible to have nested folders. It does also exclude files that start with a period or an underscore. Not sure why this isn’t working for you. Are you using JupyterDash ?