I've just checked master branch and in the browser it works correctly. Could you try?
On Friday, January 5, 2018 at 12:48:21 PM UTC+1, Scott Hunter wrote: > > I had to use a fresh copy of web2py in order to try it with python2 > (otherwise I get an error complaining about unsupported pickle protocol), > but that worked, including supporting basic authentication & an actual > RESTful API. > > So I'd definitely concur about this being a gap in Python3 coverage. > > - Scott > > On Friday, January 5, 2018 at 2:46:22 AM UTC-5, Dave S wrote: >> >> >> >> On Thursday, January 4, 2018 at 1:07:24 PM UTC-8, Scott Hunter wrote: >>> >>> If I try to user curl to call the api_get_user_email function in the >>> default controller of the welcome app, using a fresh copy of web2py & under >>> python 3.6.3, the following ticket gets generated: >>> >>> <class 'TypeError'> a bytes-like object is required, not 'str'Version >>> web2py™ Version 2.16.1-stable+timestamp.2017.11.14.05.54.25Traceback >>> >>> 1. >>> 2. >>> 3. >>> 4. >>> 5. >>> >>> Traceback (most recent call last): >>> File "/Users/shunter/Dropbox/web2py-v2.16.1/gluon/restricted.py", line >>> 219, in restricted >>> exec(ccode, environment) >>> TypeError: a bytes-like object is required, not 'str' >>> [...] >>> >>> >> >>> Any guidance as to what needs to be fixed would be appreciated. >>> >>> >>> - Scott >>> >> >> I'd say it was a place where the port to Python 3 was incomplete. Have >> you tried using the API url in Python 3 before? If you set up the same >> test using a Python 2 environment, does it work? >> >> /dps >> >> -- 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 the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.