On 18-04-08 17:01:48, Martin Blais wrote: > The CSV importer that is provided puts together a regexp from the list of > fields you provide. > This regexp is run against the contents of the files it is scanning, in > order to identify whether a particular importer should be able to process a > file. > > The regexp is built from the fields you provide, I think, for this > importer, it's in the source code. > You'll have to open up the source code to debug this, but I suspect your > list of fields may not exactly match that from your files. > (There ought to be better tools for debugging this, but because setting up > the import config usually requires coding, people just override methods and > put prints and debug it that way.)
Sorry for long delay, I finally tried looking into this again. It seems like I'm severely misunderstanding something here. My importer init now looks like this: def __init__(self, account): csv.Importer.__init__( self, self.config, account, 'Currency', ('Transaction Date,Posted Date,Description,Payee,' 'Payee account,Amount,Balance'), 1) print("REGEXPS: {}".format(self.regexps)) but what I'm seeing, makes no sense, I don't expect it to match anything ever, unless I'm misunderstanding how this works: $ PYTHONPATH=`pwd` bean-identify test.config.py bank_history_sample.csv REGEXPS: [('Transaction Date,Posted Date,Description,Payee,Payee account,Amount,Balance', re.compile('Transaction Date,Posted Date,Description,Payee,Payee account,Amount,Balance', re.IGNORECASE|re.MULTILINE|re.DOTALL))] **** /home/viq/Work/Own/beancount/bank_history_sample.csv -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscr...@googlegroups.com. To post to this group, send email to beancount@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20180422194611.z32tlg24bxpf27xk%40hirauchi. For more options, visit https://groups.google.com/d/optout.