Library for reports in .xlsx

Vojtěch Fried Dr.Fie at seznam.cz
Sat Jun 24 08:04:56 EDT 2017


Hi Andrey,

the library looks promising. But when I run gcreport on my (compressed) xml
gnucash file, I got this error.

Traceback (most recent call last):
  File "c:\python36\lib\site-packages\pandas\core\indexes\base.py", line
2442, in get_loc
    return self._engine.get_loc(key)
  File "pandas\_libs\index.pyx", line 132, in
pandas._libs.index.IndexEngine.get_loc (pandas\_libs\index.c:5280)
  File "pandas\_libs\index.pyx", line 154, in
pandas._libs.index.IndexEngine.get_loc (pandas\_libs\index.c:5126)
  File "pandas\_libs\hashtable_class_helper.pxi", line 1210, in
pandas._libs.hashtable.PyObjectHashTable.get_item
(pandas\_libs\hashtable.c:20523)
  File "pandas\_libs\hashtable_class_helper.pxi", line 1218, in
pandas._libs.hashtable.PyObjectHashTable.get_item
(pandas\_libs\hashtable.c:20477)
KeyError: 'post_date'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "c:\python36\scripts\gcreport.exe\__main__.py", line 9, in <module>
  File "c:\python36\lib\site-packages\gnucashreport\gcreportcli.py", line
32, in main
    gcrep.all_reports_excel(p_args.xlsx_file, glevel=p_args.glevel)
  File "c:\python36\lib\site-packages\gnucashreport\gcreport.py", line 101,
in all_reports_excel
    self._complex_report_writer(xlsxreport, start_date, end_date,
period='M', glevel=glevel)
  File "c:\python36\lib\site-packages\gnucashreport\gcreport.py", line 240,
in _complex_report_writer
    glevel=glevel)
  File "c:\python36\lib\site-packages\gnucashreport\gnucashdata.py", line
1417, in turnover_by_period
    group = self._currency_calc(sel_df)
  File "c:\python36\lib\site-packages\gnucashreport\gnucashdata.py", line
1570, in _currency_calc
    start_date = df[cols.POST_DATE].min()
  File "c:\python36\lib\site-packages\pandas\core\frame.py", line 1964, in
__getitem__
    return self._getitem_column(key)
  File "c:\python36\lib\site-packages\pandas\core\frame.py", line 1971, in
_getitem_column
    return self._get_item_cache(key)
  File "c:\python36\lib\site-packages\pandas\core\generic.py", line 1645, in
_get_item_cache
    values = self._data.get(item)
  File "c:\python36\lib\site-packages\pandas\core\internals.py", line 3590,
in get
    loc = self.items.get_loc(item)
  File "c:\python36\lib\site-packages\pandas\core\indexes\base.py", line
2444, in get_loc
    return self._engine.get_loc(self._maybe_cast_indexer(key))
  File "pandas\_libs\index.pyx", line 132, in
pandas._libs.index.IndexEngine.get_loc (pandas\_libs\index.c:5280)
  File "pandas\_libs\index.pyx", line 154, in
pandas._libs.index.IndexEngine.get_loc (pandas\_libs\index.c:5126)
  File "pandas\_libs\hashtable_class_helper.pxi", line 1210, in
pandas._libs.hashtable.PyObjectHashTable.get_item
(pandas\_libs\hashtable.c:20523)
  File "pandas\_libs\hashtable_class_helper.pxi", line 1218, in
pandas._libs.hashtable.PyObjectHashTable.get_item
(pandas\_libs\hashtable.c:20477)
KeyError: 'post_date'

Any idea?

I could not try sqlite because gnucash refuses to save the file in sqlite
format.

Vojtěch



--
View this message in context: http://gnucash.1415818.n4.nabble.com/Library-for-reports-in-xlsx-tp4692195p4692348.html
Sent from the GnuCash - User mailing list archive at Nabble.com.


More information about the gnucash-user mailing list