Traceback (most recent call last):
File "G:\software\JetBrains\PyCharm2017.3.4\helpers\pydev\pydevd.py", line 1668, in <module>
main()
File "G:\software\JetBrains\PyCharm2017.3.4\helpers\pydev\pydevd.py", line 1662, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "G:\software\JetBrains\PyCharm2017.3.4\helpers\pydev\pydevd.py", line 1072, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "G:\software\JetBrains\PyCharm2017.3.4\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "G:/work/scrapyDemo/parse/parse_file.py", line 7, in <module>
from .Video import *
SystemError: Parent module '' not loaded, cannot perform relative import
- 定义一个同级目录的对象,导入报错(大意是未加载python父模块“”,无法执行相对导入)
class Video:
name = ''
type = ''
relative_path = ''
img = ''
def __init__(self,name,type,relative_path,img):
self.name = name
self.type = type
self.relative_path = relative_path
self.img = img

from parse.Video import *
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现