chat.freenode.net #tryton log beginning Fri Feb 12 12:00:01 AM CET 2021 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 23:55 | |
-!- thaneor(~acer8@r167-57-95-147.dialup.adsl.anteldata.net.uy) has joined #tryton | 00:59 | |
-!- thaneor(~acer8@r167-57-95-147.dialup.adsl.anteldata.net.uy) has joined #tryton | 01:44 | |
-!- thaneor1(~ldlc6@r167-61-182-47.dialup.adsl.anteldata.net.uy) has joined #tryton | 01:59 | |
-!- thaneor2(~acer8@r186-54-28-177.dialup.adsl.anteldata.net.uy) has joined #tryton | 03:06 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 06:01 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton | 06:15 | |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 07:36 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 07:57 | |
-!- mariomop(~quassel@181.29.189.235) has joined #tryton | 10:54 | |
-!- udono(~udono@94.31.97.82) has joined #tryton | 12:13 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 13:03 | |
-!- thaneor(~ldlc6@r190-135-72-203.dialup.adsl.anteldata.net.uy) has joined #tryton | 14:01 | |
-!- thaneor1(~acer8@r186-54-28-177.dialup.adsl.anteldata.net.uy) has joined #tryton | 14:05 | |
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton | 14:25 | |
mrichez | hi, need some help with a route. It's a simple route returning active products: https://pastebin.com/LtgCmfpx | 14:32 |
---|---|---|
mrichez | got a "TypeError: Expected bytes" on tryton server when calling route | 14:33 |
mrichez | here"s the log: https://pastebin.com/i4kR3xjC | 14:34 |
cedk | mrichez: do you request json? because you return a list which is not an HTTP answer | 14:36 |
mrichez | cedk: just doing requests.get | 14:37 |
cedk | mrichez: you must set Content-Type: json if you want to receive json | 14:41 |
mrichez | cedk: how to set Content-Type with tryton route ? | 14:42 |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 14:42 | |
-!- udono(~udono@94.31.97.82) has joined #tryton | 14:47 | |
pokoli | mrichez: https://hg.tryton.org/trytond/file/bdea3f9af35f/trytond/protocols/wrappers.py#l215 | 14:48 |
cedk | mrichez: it is on the request header | 14:49 |
pokoli | mrichez: you should convert convert your object to sjson and set contect_type_attribute on the response | 14:49 |
mrichez | Ok, thanks both of you :-) | 14:49 |
cedk | indeed if your route should always return json, it is probably better to return a Response with json dump | 14:51 |
mrichez | cedk: thanks for advice | 14:52 |
-!- lucas_(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton | 15:02 | |
-!- thaneor1(~acer8@r167-57-62-132.dialup.adsl.anteldata.net.uy) has joined #tryton | 15:08 | |
-!- lucascastro(~lucascast@177-185-133-183.dynamic.isotelco.net.br) has joined #tryton | 15:43 | |
-!- fooflare(~fooflare@213.94.26.109) has joined #tryton | 15:55 | |
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton | 18:26 | |
-!- lucas_(~lucascast@177.51.23.122) has joined #tryton | 18:31 | |
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton | 19:05 | |
-!- fooflare(~fooflare@213.94.26.109) has joined #tryton | 19:12 | |
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton | 19:13 | |
-!- lucascastro(~lucascast@45-167-143-6.netfacil.inf.br) has joined #tryton | 19:20 | |
-!- lucascastro(~lucascast@177-185-133-183.dynamic.isotelco.net.br) has joined #tryton | 20:09 | |
-!- lucascastro(~lucascast@177-185-133-183.dynamic.isotelco.net.br) has joined #tryton | 20:18 | |
-!- thaneor1(~acer8@r167-57-62-132.dialup.adsl.anteldata.net.uy) has joined #tryton | 21:54 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!