Skip to content

grade motivation error - "ValueError: could not convert string to float: '-1\n= -1'" #18

@GenevieveBuckley

Description

@GenevieveBuckley

I've just come across this error with grader, although I'm not sure how serious it is yet.
I pip installed grader from the blank-applied branch of @jni's fork

Note that I graded a few applications just fine before this one threw an error.

Your choice (-1, 0, 1)/s/d/l LABEL []? 0
motivation score set to 0

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ 7.2% done, 244 left to go ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━┛


bad value: could not convert string to float: '-1\n= -1'
Traceback (most recent call last):
  File "/anaconda3/envs/scipyschool-admin/lib/python3.6/site-packages/grader/grader.py", line 1378, in main
    cmd.cmdloop()
  File "/anaconda3/envs/scipyschool-admin/lib/python3.6/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/anaconda3/envs/scipyschool-admin/lib/python3.6/cmd.py", line 217, in onecmd
    return func(arg)
  File "/anaconda3/envs/scipyschool-admin/lib/python3.6/site-packages/grader/grader.py", line 588, in do_grade
    if not self._grade(person, opts.disagreement is not None):
  File "/anaconda3/envs/scipyschool-admin/lib/python3.6/site-packages/grader/grader.py", line 662, in _grade
    self._dumpone(person, format='motivation')
  File "/anaconda3/envs/scipyschool-admin/lib/python3.6/site-packages/grader/grader.py", line 419, in _dumpone
    motivation_scores=self._gradings(p, 'motivation'),
  File "/anaconda3/envs/scipyschool-admin/lib/python3.6/site-packages/grader/grader.py", line 646, in _gradings
    return list_of_float(gen)
  File "/anaconda3/envs/scipyschool-admin/lib/python3.6/site-packages/grader/grader.py", line 645, in <genexpr>
    for identity in IDENTITIES)
  File "/anaconda3/envs/scipyschool-admin/lib/python3.6/site-packages/grader/configfile.py", line 26, in get
    return self.__getitem__(item)
  File "/anaconda3/envs/scipyschool-admin/lib/python3.6/site-packages/grader/configfile.py", line 18, in __getitem__
    value = self.type(value)
ValueError: could not convert string to float: '-1\n= -1'
grader> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions