hello, I followed the documentation, but it didn’t work!
message:
➜ autodiscover sanic server.app --debug
Starting in v22.3, --debug will no longer automatically run the auto-reloader.
Switch to --dev to continue using that functionality.
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sanic/log.py:89: DeprecationWarning: [DEPRECATION v22.6] The register argument is deprecated and will stop working in v22.6. After v22.6 all apps will be added to the Sanic app registry.
warn(version_info + message, DeprecationWarning)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/bin/sanic", line 8, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sanic/__main__.py", line 12, in main
cli.run()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sanic/cli/app.py", line 75, in run
app = self._get_app()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sanic/cli/app.py", line 127, in _get_app
module = import_module(module_name)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/Users/bitmain/Desktop/Code/sanic/autodiscover/server.py", line 8, in <module>
autodiscover(
File "/Users/bitmain/Desktop/Code/sanic/autodiscover/utility.py", line 32, in autodiscover
base = Path(module.__file__).parent
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/pathlib.py", line 1082, in __new__
self = cls._from_parts(args, init=False)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/pathlib.py", line 707, in _from_parts
drv, root, parts = self._parse_args(args)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/pathlib.py", line 691, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
thank you