The above code also works fine for me. The module in my project is similar to the code snippet, and it works fine when I extract the module out of my project. But it always occurs the above error when I run the project. I don’t know why.