Small Bug - Weird Email Addresses

Hi guys, not a big deal, but on this line of code:
anvil.users.signup_with_form(allow_cancel=allow_cancel)

I got this bug:
anvil.email.SendFailure: Not a valid sequence of addresses: abcdefghij 41@gmail.com

(the abcdefghij was an actual email I can’t share, but the formatting, including the number and the space, were this way.)

Spaces are not allowed in email addresses.

Yeah, makes sense, but shouldnt the form that anvil shows at that stage check for it in a way that doesnt throw an error? I actually thought they do that.

1 Like

Interesting, I wasn’t aware the spaces were allowed in email addresses. Apparently they must be wrapped in quotes to be allowed. So the user would have needed to input "abcdefghij 41"@gmail.com

However, it does seem like most email services don’t allow the registration of email address with spaces.

@stefano.menci Indeed they dont have an error check on it. It just throws an error:

Error Message: Not a valid sequence of addresses: asdf adf @gmail.com
Error Status: no status
Error Type: <class ‘anvil.server.AnvilWrappedError’>