RunestoneInteractive / RunestoneInteractive/rs
Runestone Issue: Can't get stdin working in Activecode
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 69
- Forks
- 117
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 24
Description
Please check the current issues
Can't find anything containing 'stdin'
What Page were you on
https://runestone.academy/assignment/instructor/builder/255445/exercises/create/activecode
Describe the bug
I set up stdin for an exercise and wrote this program:
import sys
import turtle
t = turtle.Turtle()
# 1. Read the entire input buffer into a variable
raw_input = sys.stdin.read()
# 2. Check if raw_input exists and is not empty to avoid TypeErrors
if raw_input:
# 3. Process the lines
for line in raw_input.splitlines():
for char in line.upper():
if char == 'F':
t.forward(20)
elif char == 'B':
t.backward(20)
elif char == 'L':
t.left(90)
elif char == 'R':
t.right(90)
elif char == 'U':
t.penup()
elif char == 'D':
t.pendown()
but I get:
ExternalError: TypeError: Cannot read properties of undefined (reading 'length') on line 7
A Screenshot is worth a thousand words
A video of you reproducing the problem is worth even more.
Javascript Errors
Many many errors can be quickly diagnosed from the Javascript Console error log. On Chrome this is View --> Developer --> Javascript Console, on Safari ⌥⌘i or Develop --> Show Web Inspector on Firefox Tools --> Web Developer --> Toggle Tools. Please select all and paste it here. Don't try to guess what might be useful. This is perhaps the most useful thing you can do to help us track down a problem!!
What is your username
tomkirby
If you do not take the time to fill in this template we will treat this as very low priority.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the example from the Activecode exercise builder URL with stdin and turtle enabled, then inspect the Activecode execution path that handles the input buffer. Done means the submitted program can read stdin and run without the reported TypeError; no test file or implementation entry point is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100