'a float is required' error when sending branch mail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
High
|
Unassigned |
Bug Description
This error is raised as an OOPS (e.g. OOPS-1268BM6) by the branch mailer.
Traceback (most recent call last):
Module lp.services.
self.
Module lp.services.
job.run()
Module lp.code.
mailer.
Module lp.services.
ctrl = self.generateEm
Module lp.services.
subject = self._getSubjec
Module lp.services.
return self._subject_
TypeError: a float is required
The error is probably caused by '_subject_template' containing '%f'. The fix is to sanitize the subject template before using it as the LHS operand of the modulo operator.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jonathan Lange wrote: job.runner, line 57, in runAll job.runner, line 38, in runJob model.branchjob , line 332, in run mail.basemailer , line 111, in sendAll ail(email, recipient) mail.basemailer , line 57, in generateEmail t(email) mail.basemailer , line 66, in _getSubject template % self._getTempla teParams( email)
> Public bug reported:
>
> This error is raised as an OOPS (e.g. OOPS-1268BM6) by the branch
> mailer.
>
> Traceback (most recent call last):
> Module lp.services.
> self.runJob(job)
> Module lp.services.
> job.run()
> Module lp.code.
> mailer.sendAll()
> Module lp.services.
> ctrl = self.generateEm
> Module lp.services.
> subject = self._getSubjec
> Module lp.services.
> return self._subject_
> TypeError: a float is required
>
> The error is probably caused by '_subject_template' containing '%f'. The
> fix is to sanitize the subject template before using it as the LHS
> operand of the modulo operator.
The subject template is meant to contain %f-style formatting. If you
sanitize it, you destroy it.
The real problem is that it's being set to the wrong value.
Aaron enigmail. mozdev. org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkp A5F0ACgkQ0F+ nu1YWqI2CwwCZAT gXcZQqGAEjX45fk Z8qm/Qf OmFXYAklpSmKLWB lY
1s0An2TWd6Dl7wi
=YG+J
-----END PGP SIGNATURE-----