Hello, I have just begun attempting to use beancount (v2). I have written 
an importer. 
bean-extract works (thankfully) but bean-identify (and bean-file) throw an 
error that I cannot figure out.

I am on macOS Catalina. I am running python version 3.9.4 in a virtual 
environment.
I am using beancount v 2.3.5:

(beancount-v2) *➜  **finances* *git:(**main**) **✗* bean-identify -V

Beancount 2.3.5 (git:d8a45f5e; 2022-02-18)

The error messages look like this:

(beancount-v2) *➜  **finances* *git:(**main**) **✗* bean-identify config.py 
downloads

account = Assets:Chase:Checking   name = Chase2818_Activity

**** 
/Users/bruceberk/work/finances/downloads/Chase2818_Activity_20220901.CSV

Traceback (most recent call last):

  File "/Users/bruceberk/work/finances/venv/bin/bean-identify", line 8, in 
<module>

    sys.exit(identify_main())

  File 
"/Users/bruceberk/work/finances/venv/lib/python3.9/site-packages/beancount/ingest/scripts_utils.py",
 
line 31, in identify_main

    return trampoline_to_ingest(identify)

  File 
"/Users/bruceberk/work/finances/venv/lib/python3.9/site-packages/beancount/ingest/scripts_utils.py",
 
line 198, in trampoline_to_ingest

    return run_import_script_and_ingest(parser)

  File 
"/Users/bruceberk/work/finances/venv/lib/python3.9/site-packages/beancount/ingest/scripts_utils.py",
 
line 246, in run_import_script_and_ingest

    return ingest(importers_list)

  File 
"/Users/bruceberk/work/finances/venv/lib/python3.9/site-packages/beancount/ingest/scripts_utils.py",
 
line 140, in ingest

    args.command(args, parser, importers_list, abs_downloads, hooks=hooks)

  File 
"/Users/bruceberk/work/finances/venv/lib/python3.9/site-packages/beancount/ingest/identify.py",
 
line 99, in run

    return identify(importers_list, files_or_directories)

  File 
"/Users/bruceberk/work/finances/venv/lib/python3.9/site-packages/beancount/ingest/identify.py",
 
line 85, in identify

    logfile.write('Importer:    {}\n'.format(importer.name() if importer 
else '-'))

TypeError: 'str' object is not callable


The relevant part of my config file looks like:

CONFIG = [ChaseBankImporter("Assets:Chase:Checking", "Chase2818_Activity", 
"USD")]


My identify function is:

def identify(self, file):
    # check file naming convention
    return re.match(self.name, path.basename(file.name)) and\
re.match("Details,Posting Date,Description,Amount,Type,Balance,Check or 
Slip #",
file.head())

When I run

python3 -m beancount.scripts.deps

there is no output.

Any help as to what is going on would be greatly appreaciated.

Bruce

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/08a46f16-f48f-4173-ac58-5ac6d19b24e8n%40googlegroups.com.

Reply via email to