"TypeError: sequence of byte string values expected, value of type str found" when accessing admin

184 views
Skip to first unread message

João Matos

unread,
Apr 8, 2019, 12:56:49 PM4/8/19
to web2py-users

When using Apache 2.4 (HTTPS using port 443) with web2py the application works fine, but the admin interface always returns and error "Internal Server Error".

This only happens if using port 443 (if I change the HTTPS port to eg. 8000, it all works).

I checked that I don't have any other program/process using port 443.


The Apache error.log shows this

[Mon Apr 08 00:36:13.551971 2019] [wsgi:error] [pid 4448:tid 924] [client 192.168.1.119:61409] mod_wsgi (pid=4448): Exception occurred processing WSGI script 'C:/web2py/wsgihandler.py'.
[Mon Apr 08 00:36:13.551971 2019] [wsgi:error] [pid 4448:tid 924] [client 192.168.1.119:61409] TypeError: sequence of byte string values expected, value of type str found\r

I searched for this and found this article
https://stackoverflow.com/questions/34838443/typeerror-sequence-of-byte-string-values-expected-value-of-type-str-found

Apparently this has to do with Python3.
Maybe web2py is sending str instead of bytes to Apache when accessing the admin interface?


My env

Windows 7 Pro x64 SP1+all upd
Firefox 66.0.2 x64
Python 3.7.1 x86
web2py 2.18.4
Apache 2.4 (httpd-2.4.39-win32-VC14)
mod_wsgi-4.5.24+ap24vc14-cp37-cp37m-win32.whl


Ian W. Scott

unread,
May 1, 2020, 2:15:29 PM5/1/20
to web2py-users
Did you ever solve this problem? I'm running into the same thing.

João Matos

unread,
May 1, 2020, 2:22:59 PM5/1/20
to web...@googlegroups.com, Ian W. Scott
Hello,

Nope. What I did was use another port with HTTPS (not 443, eg. 8000) for the client's application.


Best regards,

João Matos
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/OXyGJcA_TU4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/1bc6d551-020a-43b9-89fd-cfc936f5aa97%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages