Forum

Author Topic: loadReference returning odd error  (Read 2566 times)

talldrinks

  • Newbie
  • *
  • Posts: 13
    • View Profile
loadReference returning odd error
« on: March 12, 2017, 10:01:34 AM »
Hi friends.
I just keep getting this error when I try to loadReference, using a csv file, which works fine if loaded manually in the GUI...

My python script:
csvFilePath = "C:/temp/CamData.csv"
chunk.loadReference(path='csvFilePath', format='csv', columns='nxzyXZY', delimiter=',')

Error in Agi:

Traceback (most recent call last):  File "C:/temp/tempScript.py", line 2, in <module>
PhotoScan.app.document.chunk.loadReference('csvFilePath','csv','nxzyXZY',',')
TypeError: argument 2 must be TiffCompressionDeflate, not str

TiffCompressionDeflate!? I don't get it. On Version 1.3.0, Build 3772, 64-bit

Thank you! (sorry about formatting, the web markup tools aren't doing anything for me, I tried to wrap lines as #code)
« Last Edit: March 12, 2017, 10:04:16 AM by talldrinks »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15029
    • View Profile
Re: loadReference returning odd error
« Reply #1 on: March 12, 2017, 10:12:25 AM »
Hello talldrinks,

We'll check the error message, but anyway the format in 1.3.0 should be not "csv", but PhotoScan.ReferenceFormat.ReferenceFormatCSV. It looks like the example in the API Reference is outdated.
Best regards,
Alexey Pasumansky,
Agisoft LLC

talldrinks

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: loadReference returning odd error
« Reply #2 on: March 13, 2017, 07:05:20 AM »
Beauty. Works perfectly thank you.