jbms / beancount-import

Web UI for semi-automatically importing external data into beancount
GNU General Public License v2.0
393 stars 103 forks source link

Examples/data/importers csv files not being imported. #169

Closed hexhexD closed 2 years ago

hexhexD commented 2 years ago

Beancount 2.3.5 beancount-import 1.3.5 Trying to get my own importer to work by using the examples as an reference. I tried the run.py in both manually and fresh directory but both end up not having the entries from Examples/data/importers on the pending tab on the right. Any help would be much appreciated.

hexhexD commented 2 years ago

Found the cause of my issue. Beancount code lacks error message so you got dig into the source code to find out what happened.

On line 176 of C:\Users\Admin\AppData\Local\Programs\Python\Python39\Lib\site-packages\beancount\ingest\importers\csv.py. Change matchers.append(('mime', 'text/csv')) to matchers.append(('mime', 'application/vnd.ms-excel')) resolves my issue. Somehow on windows the MIME for .csv files is application/vnd.ms-excel

hexhexD commented 1 year ago

https://github.com/beancount/beangulp/pull/105