Forum

Author Topic: LoadReference error  (Read 3351 times)

Paulo

  • Hero Member
  • *****
  • Posts: 1360
    • View Profile
LoadReference error
« on: March 17, 2017, 11:59:19 AM »
Hello,

I am writing a script version 1.2.6 that would load reference from a text file (tab delimited) with nxyzabc information using following code

chunk.loadReference(file, 'csv' , 'nxyzabc',  '\t', group_delimiters=False, skip_rows=1)

I get following encoding error in console:

2017-03-17 02:52:52   File "C:/Users/paul.pelletier/Documents/Photoscan/Importeoypr_files_chunks.py", line 29
2017-03-17 02:52:52 SyntaxError: Non-UTF-8 code starting with '\xa0' in file C:/Users/paul.pelletier/Documents/Photoscan/Importeoypr_files_chunks.py on line 29, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Any help?
Best Regards,
Paul Pelletier,
Surveyor

Paulo

  • Hero Member
  • *****
  • Posts: 1360
    • View Profile
Re: LoadReference error
« Reply #1 on: March 17, 2017, 12:38:00 PM »
I found the error in line of code after much head scratching

There were 2 spaces before "\t" delimiter definition... deleting one space did it!
Best Regards,
Paul Pelletier,
Surveyor