<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small"><div class="gmail_default">Guys, time to give back... </div><div class="gmail_default">The problem was UTF8 BOM (<a href="https://en.wikipedia.org/wiki/Byte_order_mark" target="_blank">https://en.wikipedia.org/wiki/Byte_order_mark</a>)</div><div class="gmail_default">That puts an HEX code at the beggining of the file, that messes things up.</div><div class="gmail_default">If saved in UTF-8 without BOM everything is fine!</div><div class="gmail_default"><br></div><div class="gmail_default">Daniel, </div><div class="gmail_default">another one for the roadmap? - Check and remove BOM from UTF8 encoded CSV... </div><div class="gmail_default"><br></div><div class="gmail_default">Thank you</div><div class="gmail_default">Marco</div></div><div class="gmail_extra"><div><div class="gmail_signature"></div></div>
<br><div class="gmail_quote">On Wed, Sep 23, 2015 at 12:20 PM, Marco Teixeira <span dir="ltr"><<a href="mailto:admin@marcoteixeira.com" target="_blank">admin@marcoteixeira.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:tahoma,sans-serif;font-size:small">Hello Daniel,</div><div style="font-family:tahoma,sans-serif;font-size:small"><br></div><div style="font-family:tahoma,sans-serif;font-size:small">I already had found your sample file somewhere in this list. I based my file on it... The only thing i changed is the pattern. I'm using "^351". Fromk ehat i can see of the error, it doesn't even parse the first line.</div><div style="font-family:tahoma,sans-serif;font-size:small">I also tried the file in UNIX and DOS format (because of LineBreaks) </div><div style="font-family:tahoma,sans-serif;font-size:small">Always same result...</div><span class=""><div style="font-family:tahoma,sans-serif;font-size:small"><br></div><div style="font-family:tahoma,sans-serif;font-size:small"><br></div><div><font face="monospace, monospace">MSG="Failed to upload Billing Fees (DBIx::Class::Schema::txn_do(): Some lines could not be parsed. Did not reach eof. Last successful: 0. at /usr/share/perl5/NGCP/Panel/Controller/Billing.pm line 467. at /usr/share/perl5/Catalyst/Model/DBIC/Schema.pm line 501#012)" LOG=""</font><br></div><div><font face="monospace, monospace"><br></font></div><div style="font-family:tahoma,sans-serif;font-size:small"><br></div></span><div style="font-family:tahoma,sans-serif;font-size:small">---<br></div><div class="gmail_extra"><div><div><div dir="ltr"><div><font face="tahoma, sans-serif" style="background-color:rgb(255,255,255)">Cumprimentos / Best regards</font></div><span class="HOEnZb"><font color="#888888"><div><font face="tahoma, sans-serif" style="background-color:rgb(255,255,255)">Marco</font></div></font></span></div></div></div><div><div class="h5">
<br><div class="gmail_quote">On Wed, Sep 23, 2015 at 10:15 AM, Daniel Grotti <span dir="ltr"><<a href="mailto:dgrotti@sipwise.com" target="_blank">dgrotti@sipwise.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Marco,<br>
the one in attach should be the right format.<br>
Please check it out.<br>
<br>
<br>
--<br>
Daniel Grotti<br>
VoIP Engineer<br>
<br>
<br>
Sipwise GmbH<br>
Europaring F15 | 2345 Brunn am Gebirge, Austria | <a href="http://www.sipwise.com" rel="noreferrer" target="_blank">www.sipwise.com</a><br>
<div><div><br>
On 09/23/2015 10:12 AM, Marco Teixeira wrote:<br>
> Hello list,<br>
><br>
> Anyone managed to import Fees as CSV in LTS 3.8.3 ?<br>
> Always getting this in panel.log:<br>
><br>
> ngcp-panel: ERROR: IP=X.X.X.X CALLED=Controller::Billing::fees_upload<br>
> TX=14068C5A8908C020 USER=admin DATA={ 'save' => 'Upload', 'submitid' =><br>
> '', 'upload_fees' => 'CSV.txt'} MSG="Failed to upload Billing Fees<br>
> (DBIx::Class::Schema::txn_do(): Some lines could not be parsed. Did not<br>
> reach eof. Last successful: 0. at<br>
> /usr/share/perl5/NGCP/Panel/Controller/Billing.pm line 467. at<br>
> /usr/share/perl5/Catalyst/Model/DBIC/Schema.pm line 501#012)" LOG=""<br>
><br>
> Did not touch fees field order in config.yml:<br>
> fees_csv:<br>
> element_order:<br>
> - source<br>
> - destination<br>
> - direction<br>
> - zone<br>
> - zone_detail<br>
> - onpeak_init_rate<br>
> - onpeak_init_interval<br>
> - onpeak_follow_rate<br>
> - onpeak_follow_interval<br>
> - offpeak_init_rate<br>
> - offpeak_init_interval<br>
> - offpeak_follow_rate<br>
> - offpeak_follow_interval<br>
> - use_free_time<br>
><br>
> My CSV.txt is like this (edited in notepad++ in UTF8 in UNIX format):<br>
> ".","\.local$",out,"local","local services",0,1,0,1,0,1,0,1,0<br>
> ".","^3512",out,"PT","Portugal Fixed",0.1,1,0.1,1,0.1,1,0.1,1,0<br>
><br>
> By looking at the code, it line that errors out points to a cycle for<br>
> working billing zones... (i already have them created)<br>
><br>
> Any clues ?<br>
><br>
> ---<br>
> Best regards<br>
> Marco<br>
> ---<br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Spce-user mailing list<br>
> <a href="mailto:Spce-user@lists.sipwise.com" target="_blank">Spce-user@lists.sipwise.com</a><br>
> <a href="https://lists.sipwise.com/listinfo/spce-user" rel="noreferrer" target="_blank">https://lists.sipwise.com/listinfo/spce-user</a><br>
><br>
<br>_______________________________________________<br>
Spce-user mailing list<br>
<a href="mailto:Spce-user@lists.sipwise.com" target="_blank">Spce-user@lists.sipwise.com</a><br>
<a href="https://lists.sipwise.com/listinfo/spce-user" rel="noreferrer" target="_blank">https://lists.sipwise.com/listinfo/spce-user</a><br>
<br></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>