[web2py] json Data from the server not displaying!

2023-03-20 Thread mostwanted
I have data that is in json format from the database, i want to draw a graph with data but i'm not sure how to display it in my view in graph format using the plotly library. My view code display nothing! *CONTROLLER* def dashboard(): call_clicks = db().select(db.dashboard.call_clicks) s

[web2py] Re: xmlrpc python3 error

2023-03-20 Thread Lisandro
Just in case it helps someone, I was able to change my code to make it work. It's not a complete solution: I just started using args instead of vars. I'll explain: in the client I was calling the service with some query string arguments, like this: from gluon.contrib.simplejsonrpc import Server

[web2py] Re: Validator not saving images

2023-03-20 Thread Leonel Câmara
Like I said I didn't test it :) apparently you need to seek to zero after tesseract and not after image.open as tesseract is reading it. Fixed version (which I actually tested): # -*- coding: utf-8 -*- import pytesseract from PIL import Image from pydal.validators import Validator, ValidationErr

[web2py] Re: json Data from the server not displaying!

2023-03-20 Thread Leonel Câmara
The problem is that you are creating the string you want to return and then putting it in a dictionary. You could just have returned the string. That said it's better to use response.json which does a few other things for you. Try this def dashboard(): call_clicks = db().select(db.dashboard