Skip to content

check50 Crashes When Student Code Includes Extra printf or Unexpected Output #374

@rongxin-liu

Description

@rongxin-liu
Results for cs50/problems/2025/x/readability generated by check50 v4.0.0.dev0
:) readability.c exists
:) readability.c compiles
:( handles single sentence with multiple words
    expected: EOF
    actual:   "debug this..."
:( handles punctuation within a single sentence
    expected: EOF
    actual:   "debug this..."
:( handles more complex single sentence
    expected: EOF
    actual:   "debug this..."
:( handles multiple sentences
    expected: EOF
    actual:   "debug this..."
:( handles multiple more complex sentences
    expected: EOF
    actual:   "debug this..."
:( handles longer passages
    expected: EOF
    actual:   "debug this..."
:( handles multiple sentences with different punctuation
    expected: EOF
    actual:   "debug this..."
:( handles questions in passage
    expected: EOF
    actual:   "debug this..."
:( handles reading level before Grade 1
    expected: EOF
    actual:   "debug this..."
:( handles reading level at Grade 16+
    expected: EOF
    actual:   "debug this..."
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/check50", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/ubuntu/.local/lib/python3.13/site-packages/check50/__main__.py", line 485, in main
    html = renderer.to_html(**results)
  File "/home/ubuntu/.local/lib/python3.13/site-packages/check50/renderer/_renderers.py", line 21, in to_html
    html = template.render(
        slug=slug,
    ...<3 lines>...
        color="#808080" # RGB (128, 128, 128)
    )
  File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 1295, in render
    self.environment.handle_exception()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 942, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 85, in top-level template code
  File "/usr/local/lib/python3.13/site-packages/jinja2/async_utils.py", line 48, in wrapper
    return normal_func(*args, **kwargs)
  File "/usr/local/lib/python3.13/site-packages/jinja2/filters.py", line 612, in sync_do_join
    return str(d).join(map(str, value))
                       ~~~^^^^^^^^^^^^
TypeError: 'type' object is not iterable
Sorry, something is wrong! check50 ran into an error, please try again.
If the problem persists, please visit our status page https://cs50.statuspage.io for more information.

Metadata

Metadata

Labels

4.xIssues relating to check50 4.xbug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions