[web2py] Trying out this PosOnlineStore app

2021-05-18 Thread Maurice Waka
I know this app was designed some time ago, I have two issues I need help on. 1. I tried it out this app using python3.6 but got this error when using the 'buy' function: File "/home/maurice/web2py/applications/PosOnl

Re: [web2py] How to read image in blob format from a existing db

2021-05-18 Thread Kevin Keller
Potentially. I woukd file a problem in github and use raw sql as workaround for now. Adding the py4web community to this On Tue, May 18, 2021, 20:23 Chris wrote: > I could do it with pydal but with sqlite3 library worked perfect. Is maybe > a pydal bug ? > > > Cheers. > > -- > Sent from

Re: [web2py] How to read image in blob format from a existing db

2021-05-18 Thread Chris
I could do it with pydal but with sqlite3 library worked perfect. Is maybe a pydal bug ? Cheers. -- Sent from Canary (https://canarymail.io) > On martes, may. 18, 2021 at 1:59 p. m., Chris (mailto:chriiisti...@gmail.com)> wrote: > Data is already in binary in db. > > > > Making more test when

Re: [web2py] How to read image in blob format from a existing db

2021-05-18 Thread Chris
Data is already in binary in db. Making more test when pydal retrieve the blob data from the db is only getting just a part of the information. When in print the rows after the select i get a small sample like this: images = cherry_db(cherry_db.image.node_id == i['node_id']).select(cherry_db.i

Re: [web2py] How to read image in blob format from a existing db

2021-05-18 Thread Kevin Keller
I think you have to convert the image file to binary data before saving tad blob etc..? https://pynative.com/python-mysql-blob-insert-retrieve-file-image-as-a-blob-in-mysql/ On Tue, May 18, 2021, 19:04 Chris wrote: > Hi, i’m trying to read images from a existing sqlite db. For some reason > w

[web2py] How to read image in blob format from a existing db

2021-05-18 Thread Chris
Hi, i’m trying to read images from a existing sqlite db. For some reason when i save the images to disk, they are corrupted. this is my code: cherry_db = DAL('sqlite://{}'.format(form.vars.cherry_file), folder=upload_folder, migrate=False) cherry_db.define_table('image', Field('node_id', 'integ