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

The Budget reform contract's household route errors in the qualification gate: policyengine.uk is None

已关闭 适合新手
#650 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@MaxGhenis 已经在做这个了。

开始于 2026年10月17日。

  • #651 来自 @MaxGhenis —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
testing

调研方向

从改革契约中的家庭路由开始,将它的导入与 issue 中提到的直接模块路径进行比较。使用 policyengine-uk 2.134.7 运行 1.1.0 契约;家庭路由通过且没有 NoneType 错误即表示完成。

由索引模型根据 Issue 内容生成。

描述

Every UK qualification candidate since the reform-contract gate went live has failed that gate on the wrapper.household route. The candidates are 2.134.5, 2.134.6 and 2.134.7: candidate PRs #639, #644 and #647.

The 2.134.7 attempt's report records 15 errors and 1 fail, all on wrapper.household, with:

AttributeError: 'NoneType' object has no attribute 'calculate_household'

Cause

  • scripts/check_uk_candidate.py sets POLICYENGINE_SKIP_COUNTRY_IMPORTS=1 when it is imported (line 43).
  • With that switch, policyengine/__init__.py sets policyengine.uk = None.
  • The contract's household route calls import policyengine as pe; pe.uk.calculate_household(...).

Locally, without the switch, the same route and versions pass. The full 1.1.0 contract on policyengine-uk 2.134.7 gives 773 pass, 0 fail and 0 error.

Fix

The route should import policyengine.tax_benefit_models.uk, the module policyengine.uk names, directly.

主要语言
Python
星标
8
派生
10
平均合并
21 小时 34 分钟
30 天内合并 PR
45

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

PolicyEngine/policyengine.py 的其他 Issue

查看 PolicyEngine/policyengine.py 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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