handin-server: writing a first checker

47 views
Skip to first unread message

Wayne Harris

unread,
Aug 21, 2019, 5:33:05 PM8/21/19
to racket users
I haven't been able to write a first checker. I'm always getting

map: all lists must have same size

in the server's log.

The submission always shows this in the log file:

[16|2019-08-21T21:12:35] connect from 191.35.15.190
[16|2019-08-21T21:12:39] running 12KB (123MB 133MB)
[16|2019-08-21T21:12:39] login: (whar...@protonmail.com)
[16|2019-08-21T21:12:39] assignment for (whar...@protonmail.com): assignment-1
[16|2019-08-21T21:12:40] timeout-control: reset
[16|2019-08-21T21:12:40] checking assignment-1 for (whar...@protonmail.com)
[16|2019-08-21T21:12:42] running 37KB (123MB 133MB)
[16|2019-08-21T21:12:46] running 37KB (123MB 133MB)
[16|2019-08-21T21:12:49] running 39KB (123MB 133MB)
[16|2019-08-21T21:12:52] ERROR: map: all lists must have same size
[16|2019-08-21T21:12:52] first list length: 3
[16|2019-08-21T21:12:52] other list length: 1
[16|2019-08-21T21:12:52] procedure: #<procedure:cons>

It also pops up the message error message to the student in DrRacket.

Any ideas what's causing this?

Taking the typical checker from the documentation, I started with:

(module checker handin-server/checker
(check: :language '(special intermediate)
(!procedure Fahrenheit->Celsius 1)
(!test (Fahrenheit->Celsius 32) 0)
(!test (Fahrenheit->Celsius 212) 100)
(!test (Fahrenheit->Celsius -4) -20)))

My student code in DrRacket is set to intermediate language and the
code is:

(define (Fahrenheit->Celsius x)
(* 5/9 (- x 32)))

(check-expect (Fahrenheit->Celsius 32) 0)

Here's my server configuration:

$ cat config.rktd
((active-dirs ("assignment-1"))
(allow-web-upload #t)
(allow-new-users #t)
(master-password "4c96f8324e3ba54a99e78249b95daa30"))
$

$ cat users.rktd
(
(whar...@protonmail.com ("4c96f8324e3ba54a99e78249b95daa30" "Wayne Harris"))
)
$

$ cat assignment-1/checker.rkt
(module checker handin-server/checker
(check: :language '(special intermediate)
(!procedure Fahrenheit->Celsius 1)
(!test (Fahrenheit->Celsius 32) 0)
(!test (Fahrenheit->Celsius 212) 100)
(!test (Fahrenheit->Celsius -4) -20)))
$

Matthew Flatt

unread,
Aug 22, 2019, 10:00:51 AM8/22/19
to Wayne Harris, racket users
I'm not able to provoke this error with the pieces that you provided.

Just to be sure, it's not an error in the submission that you sent to
the handin server, right? Normally the error in that case would be
"Error in your code", so I think that's not it. But does the error
depend on the program that you send as a submission?
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/Le2v4fuorTS76ru-EzIcXTxB9t0I3wyV
> 56qTFtRFY8cErV3l4mIJVUsi-s9qSlv7Q_2PVix-prxqDh5noOcmrlm3yyeB7gdBx02fwaUICW8%3D%
> 40protonmail.com.

Shu-Hung You

unread,
Aug 23, 2019, 2:00:24 PM8/23/19
to Racket Users
I forgot to CC my reply to the list. The case here is that the user
account data in `users.rktd` only contain one field but the default
`extra-fields` configuration requires 3 extra fields. The error
message probably comes from some (map cons <user-fields> ...)
expression that resides in the server code.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/5d5ea010.1c69fb81.71fbf.0dbdSMTPIN_ADDED_MISSING%40gmr-mx.google.com.

Wayne Harris

unread,
Aug 23, 2019, 10:27:48 PM8/23/19
to Shu-Hung You, Racket Users
On Friday, August 23, 2019 2:59 PM, Shu-Hung You <shu-hu...@eecs.northwestern.edu> wrote:

> I forgot to CC my reply to the list. The case here is that the user
> account data in `users.rktd` only contain one field but the default
> `extra-fields` configuration requires 3 extra fields. The error
> message probably comes from some (map cons <user-fields> ...)
> expression that resides in the server code.

And I, in turn, probably only followed up to Shu-Hung. The problem was a bad users.rktd which was solved after Shu-Hung's remark. The software runs fine and I'm studying how to customize checkers. Thank you!
Reply all
Reply to author
Forward
0 new messages