The following error occurred when I registered the plug-in. I don't know where the problem is. I have written a plug-in using SPT. It runs normally, but now the error is very strange
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/wang/.vscode/extensions/ms-python.python-2021.5.926500501/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
cli.main()
File "/home/wang/.vscode/extensions/ms-python.python-2021.5.926500501/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
run()
File "/home/wang/.vscode/extensions/ms-python.python-2021.5.926500501/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file
runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
File "/usr/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/usr/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/wang/code/python/Test/srf-project-template/run.py", line 16, in <module>
from apps import app
File "/home/wang/code/python/Test/srf-project-template/apps/__init__.py", line 49, in <module>
app = create_app()
File "/home/wang/code/python/Test/srf-project-template/apps/__init__.py", line 41, in create_app
realm.register_plugin(srf_cache)
File "/home/wang/code/venv/dev_srf/lib/python3.7/site-packages/sanic_plugin_toolkit/realm.py", line 203, in register_plugin
if plugin.is_registered_in_realm(self):
File "/home/wang/code/venv/dev_srf/lib/python3.7/site-packages/sanic_plugin_toolkit/plugin.py", line 427, in is_registered_in_realm
for reg in self.registrations:
AttributeError: registrations
The following error occurred when I registered the plug-in. I don't know where the problem is. I have written a plug-in using SPT. It runs normally, but now the error is very strange
code run.py
code plug.py