L17.P1: uncaught script errors when running this code
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- godot
- 領域
- testing
調査の方向性
Start by reproducing the bug: type cell = cell.y + 1 in the L17.P1 practice and check whether the SCRIPT ERROR lines appear in the output while the test still passes. The error path runs through ui/UIPractice.gd (_test_student_code around line 611, _run_if_valid around line 930) and script_checking/PracticeTester.gd (run_tests around line 72), with the failing test at course/lesson-18-for-loops/for_move/TestPracticeBoardFor.gd line 20. Done means a runtime script error during student code makes the practice fail with a visible message, and the test no longer passes.
索引モデルが issue の本文から書いたものです。
説明
Running the following code raises script errors that are currently not captured by the testing system:
L17.P1 I can type 'cell = cell.y + 1' rather than 'cell += Vector2(0, 1)' and the robot will not move on screen, but the practice will tell me I have succeded and the robot is on the last row.
Technical information:
- Location: L17.P1 - Introduction to For Loops > Using a for loop to move to the end of the board
- File: res://course/lesson-18-for-loops/lesson.bbcode
- Platform: Web
- Commit: edde160
Code from the current practice
var board_size = Vector2(5, 5) var cell = Vector2(2, 0) func move_to_bottom(): for number in range(board_size.y - 1): cell = cell.y + 1
Godot does raise errors in the script, but instead of being caught by the practice system like with almost all other script errors, they go to the output and the code attempts to run; in turn this abort execution of various functions and allows the practice to pass.
SCRIPT ERROR: Invalid access to property or key 'y' on a base object of type 'float'.
at: move_to_bottom (gdscript://-9223371198983825982.gd:35)
GDScript backtrace (most recent call first):
[0] move_to_bottom (gdscript://-9223371198983825982.gd:35)
[1] _run (gdscript://-9223371198983825982.gd:19)
[2] _run_if_valid (res://ui/UIPractice.gd:930)
SCRIPT ERROR: Invalid assignment of property or key 'cell' with value of type 'float' on a base object of type 'Node2D (robot_l17_p1.gd)'.
at: _run (gdscript://-9223371198983825982.gd:20)
GDScript backtrace (most recent call first):
[0] _run (gdscript://-9223371198983825982.gd:20)
[1] _run_if_valid (res://ui/UIPractice.gd:930)
SCRIPT ERROR: Invalid access to property or key 'y' on a base object of type 'float'.
at: test_robot_gets_to_bottom_of_board (res://course/lesson-18-for-loops/for_move/TestPracticeBoardFor.gd:20)
GDScript backtrace (most recent call first):
[0] test_robot_gets_to_bottom_of_board (res://course/lesson-18-for-loops/for_move/TestPracticeBoardFor.gd:20)
[1] run_tests (res://script_checking/PracticeTester.gd:72)
[2] _test_student_code (res://ui/UIPractice.gd:611)
[3] _on_autotimer_timeout (res://ui/UIPractice.gd:870)
- 主要言語
- GDScript
- スター
- 2.8k
- フォーク
- 237
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
GDQuest/learn-gdscript のほかの issue
-
user experience
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
GDQuest/learn-gdscript#1438 ·
-
user experience
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
GDQuest/learn-gdscript#1420 ·
-
難易度 3/5 半日 初心者へのやさしさ 50/100
GDQuest/learn-gdscript#1445 ·
-
bug
難易度 3/5 1〜3時間 初心者へのやさしさ 52/100
GDQuest/learn-gdscript#1444 · コメント 1 件 ·
-
content
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
GDQuest/learn-gdscript#1440 ·
GDQuest/learn-gdscript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
FujiNetWIFI/fujinet-lib#186 ·
メンテナーはふだん 1 日以内に返信
-
StepExamBenchmarkTest runs a loop and prints a timing but asserts nothing対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンjules
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
open-learning-exchange/myplanet#18199 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area:core-platform effort:S priority:P3 status:in-review type:test
難易度 2/5 1時間未満 初心者へのやさしさ 80/100
randomparity/kdive#3246 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
cleanup go hacktoberfest NWO priority: low skill: good first issue status: ready for dev
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
hyperledger-labs/fabric-smart-client#2135 ·
メンテナーはふだん 1 日以内に返信