Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

TypeError when saving notebook settings and ldap not active #141

Closed
migeruhito opened this Issue · 4 comments

4 participants

@migeruhito

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.

@ppurka
Collaborator

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)

to:

val = int(val) if val is not None else None
@ppurka ppurka referenced this issue from a commit in ppurka/sagenb
@ppurka ppurka do not convert None to int. takes care of #141 3643dea
@rmartinjak

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

@rmartinjak

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
@kini
Owner

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.