<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EstiloDeEmail20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=PT-BR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi Moritz and colleagues!!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thank you for write and being help me. About the python version make sense because I’m using Python 3.7.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ll try install Python 2.x and run again the addon v.centerline and I’ll tell about the result.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Tks.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>César de Paula<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='mso-fareast-language:PT-BR'>De:</span></b><span style='mso-fareast-language:PT-BR'> Moritz Lennert <mlennert@club.worldonline.be> <br><b>Enviada em:</b> quinta-feira, 5 de março de 2020 05:10<br><b>Para:</b> cesar@fototerra.com.br; grass-user@lists.osgeo.org<br><b>Assunto:</b> Re: [GRASS-user] v.centerline addon<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p><o:p> </o:p></p><div><p class=MsoNormal>On 4/03/20 18:10, <a href="mailto:cesar@fototerra.com.br">cesar@fototerra.com.br</a> wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hello!!!<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I’m new user on GRASS and I’m trying to execute the addon v.centerline on GRASS 7.9. As input I’m using a shapefile containing line (MultiLineString) as geometry and when I have run the v.centerline an erro is returning:<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><b>“Traceback (most recent call last):</b><o:p></o:p></p><p class=MsoNormal><b> File "C:\Users\cesar\AppData\Roaming\GRASS7\addons/scripts</b><o:p></o:p></p><p class=MsoNormal><b>/v.centerline.py", line 319, in <module></b><o:p></o:p></p><p class=MsoNormal><b> main()</b><o:p></o:p></p><p class=MsoNormal><b> File "C:\Users\cesar\AppData\Roaming\GRASS7\addons/scripts</b><o:p></o:p></p><p class=MsoNormal><b>/v.centerline.py", line 111, in main</b><o:p></o:p></p><p class=MsoNormal><b> segment_input += 'P ' + category.strip()</b><o:p></o:p></p><p class=MsoNormal><b>TypeError: can only concatenate str (not "bytes") to str</b><o:p></o:p></p><p class=MsoNormal><b>(Wed Mar 4 17:27:25 2020) Comando terminado (3 segundos) </b><o:p></o:p></p><p class=MsoNormal><b>(Wed Mar 4 17:27:25 2020) </b><o:p></o:p></p><p class=MsoNormal><b>v.centerline input=Linha_rio_teste_Centerline@PERMANENT output=teste range=2 refline=2</b><o:p></o:p></p><p class=MsoNormal><b>Traceback (most recent call last):</b><o:p></o:p></p><p class=MsoNormal><b> File "C:\Users\cesar\AppData\Roaming\GRASS7\addons/scripts</b><o:p></o:p></p><p class=MsoNormal><b>/v.centerline.py", line 319, in <module></b><o:p></o:p></p><p class=MsoNormal><b> main()</b><o:p></o:p></p><p class=MsoNormal><b> File "C:\Users\cesar\AppData\Roaming\GRASS7\addons/scripts</b><o:p></o:p></p><p class=MsoNormal><b>/v.centerline.py", line 111, in main</b><o:p></o:p></p><p class=MsoNormal><b> segment_input += 'P ' + category.strip()</b><o:p></o:p></p><p class=MsoNormal><b>TypeError: can only concatenate str (not "bytes") to str</b><o:p></o:p></p><p class=MsoNormal><b>(Wed Mar 4 17:27:28 2020) Comando terminado (2 segundos)”</b><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I would like help to try understand what’s happening.<o:p></o:p></p></blockquote><p><o:p> </o:p></p><p>I would guess that this is a Python 3 vs Python 2 issue. I never updated the addon to Python 3. If someone else can do this, it would be great, as I'm currently on mission abroad and do not really have the necessary access to the development tools to do this from here.<o:p></o:p></p><p><o:p> </o:p></p><p>Moritz<o:p></o:p></p></div></body></html>