Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

bug: `flet test` fails with `ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'`

未关闭
#7,022 3 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@ndonkoHenri 已经在做这个了。

开始于 2026年10月28日。

评估

这个 Issue 还没有评估数据。

描述

bug
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:

image

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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

flet-dev/flet 的其他 Issue

查看 flet-dev/flet 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。