On Thursday, July 18, 2019 at 10:54:38 AM UTC-7, Tito Garrido wrote: > > I just figured out that the error: > > is because of: > return db.transactions.validate_and_insert(**parent) > > seems that db.transactions.validate_and_insert(**parent) is causing an > error during the return.. if I return a string it works... >
But you said there was no entry made in the DB, so validate_and_insert(**parent) must have a processing error, as well as not returning good stuff. Use logging or print debug info to console to find out more. /dps > On Wed, Jul 17, 2019 at 11:52 PM Dave S <snide...@gmail.com <javascript:>> > wrote: > >> >> >> On Wednesday, July 17, 2019 at 3:40:07 PM UTC-7, Dave S wrote: >>> >>> >>> On Wednesday, July 17, 2019 at 11:02:59 AM UTC-7, Tito Garrido wrote: >>>> >>>> No entry in the database... >>>> >>>> I could execute the post from postman... but if I try from axios in vue >>>> I am even getting a web2py server error: >>>> >>>> ERROR:Rocket.Errors.Thread-2:Traceback (most recent call last): >>>>> File >>>>> "/Users/titogarridoogando/Documents/Projetos/web2py/controle/web2py/gluon/rocket.py", >>>>> >>>>> line 1797, in run_app >>>>> sections = len(output) >>>>> TypeError: object of type 'Reference' has no len() >>>>> >>>>> During handling of the above exception, another exception occurred: >>>>> >>>>> Traceback (most recent call last): >>>>> File >>>>> "/Users/titogarridoogando/Documents/Projetos/web2py/controle/web2py/gluon/rocket.py", >>>>> >>>>> line 1288, in run >>>>> self.run_app(conn) >>>>> File >>>>> "/Users/titogarridoogando/Documents/Projetos/web2py/controle/web2py/gluon/rocket.py", >>>>> >>>>> line 1819, in run_app >>>>> output.close() >>>>> TypeError: 'NoneType' object is not callable >>>> >>>> >>>> >>>> No idea what it means... >>>> >>> >>> Which version of web2py are you using? Is this with Python2 or Python3? >>> >>> >> >> Also, can you show us request.body, either from inside your controller, >> or from the browser tools? >> >> If you do any logging, can you check what the return value of >> validate_and_insert() is? >> >> (I use curl, or occasionally wget, for some request debugging; I'm not >> familiar with postman or axios; the one browser extension I've used is on >> the home computer, so I'll report its name later.) >> >> /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 web...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/web2py/f2b43605-f028-4293-8093-41243a9c4331%40googlegroups.com >> >> <https://groups.google.com/d/msgid/web2py/f2b43605-f028-4293-8093-41243a9c4331%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > > Linux User #387870 > .........____ > .... _/_õ|__| > ..º[ .-.___.-._| . . . . > .__( o)__( o).:_______ > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/f811a43d-2f94-4b13-b75b-82f7ca4bea27%40googlegroups.com.