Closed mpacer closed 7 years ago
so, waitress is definitely failing because argument 1 of the write command below is the output from time.strftime(). And, strftime() gives a string rather than unicode.
logfile.write(time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime()) + " " +
message + '\n')
I'm not sure why write is expecting unicode, but of course you can encode or decode strings to unicode and vice versa there in the call and see if that helps?
Unicode issues always make me think this is a python2.7 -> 3 transition issue somehow, though i'm not sure why that would be the case here, since it's clearly running python2.7...
So I came in today hoping to be able to figure this out but the best I can tell the bug has disappeared. The server now runs on both python2 and 3, and based on some recently made commits, update_prs
should run on 2 and 3 as well.
So I'm thinking (per a suggestion from @Carreau) that I should just wrap it in a try except loop with a import ipdb; ipdb.set_trace()
inside the exception handler. Fortunately we know it was a type error so we don't need to catch on general errors.
And re: the string vs. unicode bit — I would have thought the same but I don't see how the python2 server would run into this error… unless for some reason it wasn't getting waitress from the python2 env but rather the python 3 root env.
Fascinating!
On Mon, Apr 24, 2017, 4:57 PM M Pacer notifications@github.com wrote:
So I came in today hoping to be able to figure this out but the best I can tell the bug has disappeared. The server now runs on both python2 and 3, and based on some recently made commits, update_prs should run on 2 and 3 as well.
So I'm thinking (per a suggestion from @Carreau https://github.com/Carreau) that I should just wrap it in a try except loop with a import ipdb; ipdb.set_trace() inside the exception handler. Fortunately we know it was a type error so we don't need to catch on general errors.
And re: the string vs. unicode bit — I would have thought the same but I don't see how the python2 server would run into this error… unless for some reason it wasn't getting waitress from the python2 env but rather the python 3 root env.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/scipy-conference/procbuild/issues/10#issuecomment-296833734, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYCq3vUCtobInYPZGUPplkPNPVwJRCgks5rzRqvgaJpZM4NFfSK .
Closing as it seems to have been dealt with 👍
Here's the error currently after the server has been running for a while:
@katyhuff