bug: `flet test` fails with `ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'`
维护者通常 1 天内回复
@ndonkoHenri 已经在做这个了。
开始于 2026年10月28日。
评估
这个 Issue 还没有评估数据。
描述
Discussed in https://github.com/flet-dev/flet/discussions/7020
Originally posted by jules-baratoux October 28, 2026
Question
Hi,
I'm trying to run flet test, but the app fails to render not able to import Pydantic:
I'm not sure what I'm doing wrong. Is there something else I need to configure to make flet test work correctly on Windows when depending on pydantic?
Any help would be appreciated. Thanks!
Configuration
I tried adding the following configuration to my pyproject.toml, but it didn't solve the issue even after a prior flet clean:
[[tool.uv.index]]
name = "flet"
url = "https://pypi.flet.dev"
explicit = true
[tool.uv.sources]
pydantic-core = { index = "flet" }
Error message
File ".../site-packages/pydantic/version.py", line 7, in <module>
File ".../site-packages/pydantic_core/__init__.py", line 8, in <module>
ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'
Note
Also, is there a way to capture the app log (not the test log) when running flet test? I had to rely on a sleep to read the error 😅
async def test_example(flet_app: ftt.FletTestApp):
await sleep(15) # Wait to be able to read the app error
assert False
- 主要语言
- Python
- 星标
- 17.4k
- 派生
- 737
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 62
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
flet-dev/flet 的其他 Issue
-
feature request
难度 2/5 1-3 小时 新手友好度 66/100
flet-dev/flet#6985 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
flet build: common [tool.flet.deep_linking] is ignored on Android and iOS可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug packaging platform: mobile
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Sign Flet Windows Client可能已有人在做 @FeodorFitsner 于 2 天前认领。 未关闭platform: windows
flet-dev/flet#7011 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
priority middle
难度 1/5 1 小时以内 新手友好度 62/100
KATO-Hiro/AtCoderClans#12940 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 76/100
huggingface/huggingface_hub#5283 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
enhancement
难度 1/5 1 小时以内 新手友好度 86/100
维护者通常 1 天内回复
-
bug example
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复