[Python] Error: ValueError: attempted relative import beyond top-level package problem solved

Error:

Solution: add in the file of the imported template

import sys
sys.path.append("..")

 

Guess you like

Origin blog.csdn.net/weixin_44566432/article/details/107932918