Trying to perform my first translation using a fixed format as input. When attempting to run the translation, I get the following error message that references the fixed grammar file:
from bots.botsconfig import *
syntax = {
'charset' : 'utf-8', # character set is utf-8
'checkfixedrecordtooshort' : False, # check if fixed record is to short
'indented' : False, # xml: produced indented output
'noBOTSID' : True
}
structure = [
{ID:'HDR',MIN:1,MAX:99999} # event record
]
recorddefs = { # 'recorddefs' section
'HDR':[
['BOTSID', 'C', 2, 'AN'], # BOTSID
['Trk-Rec-Type', 'C', (2,2), 'AN']
['Trk-Rec-Client-ID', 'C', (3,3), 'AN'], # Client ID
['Trk-Rec-Client-Child-ID', 'C', (3,3), 'AN'], # Client brand or sub-client ID
['Trk-Rec-Client-Name', 'C', (32,32), 'AN'], # Company name
['Trk-Rec-Client-Child-Name', 'C', (32,32), 'AN'], # Company brand or sub-client name
['Trk-Rec-Hermes-Barcode-Number', 'C', (25,25), 'AN'], # The Hermes barcode number for the parcel (if supplied in the request file)
['Trk-Rec-Customer-Reference-1', 'C', (20,20), 'AN'], # A unique reference number that you use in your system to identify this parcel
['Trk-Rec-Customer-Reference-2', 'C', (20,20), 'AN'], # Value Spaces unless advised by Hermes
['Trk-Rec-Tracking-Event-ID', 'C', (9,9), 'AN'], # The ID of the tracking event that took place for this parceli
['Trk-Rec-Tracking-Event-Date', 'C', (12,12), 'AN'], # Date the tracking event was recorded against this parcel
['Trk-Rec-Tracking-Event-Additional-Information', 'C', (32,32), 'AN'], # If available, any additional information relevant to the tracking event which took place
['Trk-Rec-Linked-Barcode-Number', 'C', (25,25), 'AN'], # Value Spaces unless advised by Hermes
['Trk-Rec-Filler-1', 'C', (30,30), 'AN'], # Values Spaces
['Trk-Rec-Filler-2', 'C', (20,20), 'AN'], # Values Spaces
],
}