cs50/problems

Segmentation Fault in twitter.py

Closed this issue · 3 comments

When running the following I am getting an error:

check50 --local --no-download-checks cs50/problems/2022/python/tests/twttr
Checking.......
Results for cs50/problems/2022/python/tests/twttr generated by check50 v3.3.11
:) test_twttr.py exist
:( correct twttr.py passes all test_twttr checks
    failed to execute program due to segmentation fault
:| test_twttr catches twttr.py without vowel replacement
    can't check until a frown turns upside down
:| test_twttr catches twttr.py without capitalized vowel replacement
    can't check until a frown turns upside down
:| test_twttr catches twttr.py without lowercase vowel replacement
    can't check until a frown turns upside down
:| test_twttr catches twttr.py omitting numbers
    can't check until a frown turns upside down
:| test_twttr catches twttr.py printing in uppercase
    can't check until a frown turns upside down
:| test_twttr catches twttr.py omitting punctuation
    can't check until a frown turns upside down
To see more detailed results go to file:///tmp/tmpy6oqn_1q.html

The error is "failed to execute program due to segmentation fault". I think the problem is in /home/ubuntu/.local/share/check50/cs50/problems/tests/twttr/twttr.py. The problem line seems to be line 5 HEADER_BYTES = 16. I tried updating the value to '32, and using --offline and --no-download-checks to prevent check50 from pulling the latest file and no avail. The tests will not continue while the segmentation fault exists.

What Python version were you using on your system?

python --version
Python 3.11.8

Please upgrade your Python environment to 3.12. This check50 check will not work with any Python versions other than 3.12 or above.