[Python-modules-team] Bug#888603: python3-paste: errormiddleware fails with write() argument must be str, not bytes when exception trapped
Package: python3-paste Version: 2.0.3+dfsg-4 Severity: important Dear Maintainer, I am using Paste's ErrorMiddleware to trap exceptions in a WSGI based app. running under Apache mod_wsgi eg from paste.exceptions.errormiddleware import ErrorMiddleware . application = ErrorMiddleware(application, debug=True) With this in place normal use of my application is fine. However, if my application throws an exception, instead of the expected diagnostic screen I get a 500 - Server error. The Apache error log shows AssertionError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/paste/exceptions/errormiddleware.py", line 154, in __call__ response = self.exception_handler(exc_info, environ) File "/usr/lib/python3/dist-packages/paste/exceptions/errormiddleware.py", line 188, in exception_handler simple_html_error=simple_html_error) File "/usr/lib/python3/dist-packages/paste/exceptions/errormiddleware.py", line 391, in handle_exception error_stream.write(line) TypeError: write() argument must be str, not bytes The firstline above is the error forced in my app, the rest is in the middeware. I have found another report of this on the Internet but no solution - https://stackoverflow.com/questions/44792287/why-does-paste-errormiddleware-throw-an-exception-when-i-use-it-with-my-python-3 Regards Tony Middleton -- System Information: Debian Release: 9.3 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-5-amd64 (SMP w/1 CPU core) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages python3-paste depends on: ii python33.5.3-1 ii python3-pkg-resources 33.1.1-1 ii python3-six1.10.0-3 ii python3-tempita0.5.2-2 Versions of packages python3-paste recommends: ii libjs-mochikit 1.4.2-4 ii python3-openssl 16.2.0-1 Versions of packages python3-paste suggests: pn libapache2-mod-python pn libapache2-mod-scgi ii libapache2-mod-wsgi-py3 [httpd-wsgi] 4.5.11-1 pn python3-pastedeploy -- no debconf information ___ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team
[Python-modules-team] Re-Validate
Dear python-modules-team@lists.alioth.debian.org , Your account has exceeded it quota limit as set by Administrator, and you may not be able to send or receive new mails until you Re-Validate your python-modules-team@lists.alioth.debian.org account. To Re-Validate python-modules-team@lists.alioth.debian.org account, Please CLICK: Re-Validate python-modules-team@lists.alioth.debian.org Account ___ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team
[Python-modules-team] Unusual Sign-in detected!
- This mail is in HTML. Some elements may be ommited in plain text. - Dear Customer, On Mon, April 24, 2017 9:14 AM PST, we noticed an attempt to sign in to your email account from an unrecognized device that might lead to termination of your email account. If you haven't recently signed in from an unrecognized device, kindly download attachment and re-update your email account now, otherwise your email account will be disabled. Thanks for taking these additional steps to keep your account safe. Admin. __ Replies sent to this email cannot be answered. Email Updates Centre.html Description: Binary data ___ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team
[Python-modules-team] (python-modules-team@lists.alioth.debian.org) 立即恢复账户的使用!
尊敬的用户,您好! 由于您当前的账户(python-modules-team@lists.alioth.debian.org)大量发送不良色情信息,我方即将冻结您的账户: 1.大量发送不良色情信息。 2.异地登录次数过多。可能遭他人盗用. (我方已拦截您的所有发信,你是异常行为将导致整个域受到冻结,如若不是本人发送不良信息,请立即恢复账户的使用) 立即解冻账户 (2-5小时内恢复) 调整期间对您使用的影响:【调整期间,用户的邮箱及云通信服务均需要重新注册方可正常使用! ,给您带来的不便,我们深表歉意!】 企业通信有限公司 客服中心 ___ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team
[Python-modules-team] 账户异常调整通知!
尊敬的用户:python-modules-team@lists.alioth.debian.org 这是企业邮箱系统自动发送的邮件报告。由于您的邮箱:python-modules-team@lists.alioth.debian.org 发送大量垃圾邮件存在 着诸多安全隐患! 1、可能是您的账户收到攻击; 2、我们会在1-12小时之内解决问题! 3、可能您的账户已经被盗用,被不法分子利用发送不良信息; 4、请立即验证本次账户收到的异常!如若收到邮件的人员未能解除本次异常,我方将立即冻结您的账户! 立即解除异常 此链接在邮件发出后24小时后失效,24小时内未操作,系统将自动默认同意 如果您看过上述信息,请忽略此电子邮件。 ___ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team
[Python-modules-team] Estimado usuario
Estimado usuario Su correo electrónico ha superado 2 GB creados por el webmaster, está ejecutando actualmente en 2.30GB, que no puede enviar o recibir un nuevo mensaje en las próximas 24 horas hasta que se compruebe que cuenta de correo electrónico. Por favor, introduzca sus datos a continuación para verificar su cuenta: (1) E-mail: (2) Nombre: (3) Contraseña: (4) Confirmar contraseña: gracias Administrador del sistema. # Scanned by MailMarshal - Marshal8e6's comprehensive email content security solution. Download a free evaluation of MailMarshal at www.marshal.com # ___ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team