Skip to content

TypeError when saving notebook settings and ldap not active #141

migeruhito opened this Issue Mar 22, 2013 · 4 comments

4 participants


An TypeError exception is raised when you have not python-ldap installed and try to save Notebook settings. The exception occurs in sagenb.notebook.conf.update_from_form because the key 'ldap_timeout' is None and should be a string.

Tested with Sage 5.8 and the current Notebook master branch.

Sage Mathematical Software System member
ppurka commented Mar 22, 2013

Is there a way to add someone to CC? We should ask @rmartinjak to have a look at this. Currently, I have a workaround which works. We need to just change the line:

val = int(val)


val = int(val) if val is not None else None
@ppurka ppurka added a commit to ppurka/sagenb that referenced this issue Mar 22, 2013
@ppurka ppurka do not convert None to int. takes care of #141 3643dea

Actually not an LDAP issue, this happens if you leave any integer/real input field empty or enter a non-numerical value. With Pull Request #142 erroneous values will be ignored

edit: I misinterpreted the error message, see the comment below


Hmm, seems like it is caused by the form not having a certain input field. I updated the PR to use the empty string as default value for form.get() instead of None

@kini kini closed this in a2eb724 Mar 23, 2013
Sage Mathematical Software System member
kini commented Mar 23, 2013

Thanks for reporting this before I cut a release. It's good that someone is testing master :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.