IRC logs of #tryton for Friday, 2021-02-12

chat.freenode.net #tryton log beginning Fri Feb 12 12:00:01 AM CET 2021
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:55
-!- thaneor(~acer8@r167-57-95-147.dialup.adsl.anteldata.net.uy) has joined #tryton00:59
-!- thaneor(~acer8@r167-57-95-147.dialup.adsl.anteldata.net.uy) has joined #tryton01:44
-!- thaneor1(~ldlc6@r167-61-182-47.dialup.adsl.anteldata.net.uy) has joined #tryton01:59
-!- thaneor2(~acer8@r186-54-28-177.dialup.adsl.anteldata.net.uy) has joined #tryton03:06
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton06:01
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton06:15
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton07:36
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton07:57
-!- mariomop(~quassel@181.29.189.235) has joined #tryton10:54
-!- udono(~udono@94.31.97.82) has joined #tryton12:13
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton13:03
-!- thaneor(~ldlc6@r190-135-72-203.dialup.adsl.anteldata.net.uy) has joined #tryton14:01
-!- thaneor1(~acer8@r186-54-28-177.dialup.adsl.anteldata.net.uy) has joined #tryton14:05
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton14:25
mrichezhi, need some help with a route. It's a simple route returning active products: https://pastebin.com/LtgCmfpx14:32
mrichezgot a "TypeError: Expected bytes" on tryton server when calling route14:33
mrichezhere"s the log: https://pastebin.com/i4kR3xjC14:34
cedkmrichez: do you request json? because you return a list which is not an HTTP answer14:36
mrichezcedk: just doing requests.get14:37
cedkmrichez: you must set Content-Type: json if you want to receive json14:41
mrichezcedk: how to set Content-Type with tryton route ?14:42
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton14:42
-!- udono(~udono@94.31.97.82) has joined #tryton14:47
pokolimrichez: https://hg.tryton.org/trytond/file/bdea3f9af35f/trytond/protocols/wrappers.py#l21514:48
cedkmrichez: it is on the request header14:49
pokolimrichez: you should convert convert your object to sjson and set contect_type_attribute on the response14:49
mrichezOk, thanks both of you :-)14:49
cedkindeed if your route should always return json, it is probably better to return a Response with json dump14:51
mrichezcedk: thanks for advice14:52
-!- lucas_(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton15:02
-!- thaneor1(~acer8@r167-57-62-132.dialup.adsl.anteldata.net.uy) has joined #tryton15:08
-!- lucascastro(~lucascast@177-185-133-183.dynamic.isotelco.net.br) has joined #tryton15:43
-!- fooflare(~fooflare@213.94.26.109) has joined #tryton15:55
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton18:26
-!- lucas_(~lucascast@177.51.23.122) has joined #tryton18:31
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton19:05
-!- fooflare(~fooflare@213.94.26.109) has joined #tryton19:12
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton19:13
-!- lucascastro(~lucascast@45-167-143-6.netfacil.inf.br) has joined #tryton19:20
-!- lucascastro(~lucascast@177-185-133-183.dynamic.isotelco.net.br) has joined #tryton20:09
-!- lucascastro(~lucascast@177-185-133-183.dynamic.isotelco.net.br) has joined #tryton20:18
-!- thaneor1(~acer8@r167-57-62-132.dialup.adsl.anteldata.net.uy) has joined #tryton21:54

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!