GNOME Bugzilla – Bug 558645
MT940 import does not work
Last modified: 2018-06-29 22:11:49 UTC
Please describe the problem: using: aqbanking-3.8.0 gwenhywfar-3.5.1 gnucash-2.2.7 compiled on ubuntu 8.10. When I import a MT940 file I get the following in /tmp/gnucash.trace: * 11:12:20 CRIT <aqbanking> swift.c: 168: Buffer full (line too long) * 11:12:20 CRIT <aqbanking> swift.c: 210: Error reading from stream (-1) * 11:12:20 CRIT <aqbanking> swift.c: 111: Error importing data (-1) * 11:12:20 WARN <gnc.import.aqbanking> gnc_file_aqbanking_import: Error on import and nothing happens. I've used various mt940 files that all worked on older versions of gnucash (pre-aqbanking?). Steps to reproduce: 1. 2. 3. Actual results: in /tmp/gnucash.trace: * 11:12:20 CRIT <aqbanking> swift.c: 168: Buffer full (line too long) * 11:12:20 CRIT <aqbanking> swift.c: 210: Error reading from stream (-1) * 11:12:20 CRIT <aqbanking> swift.c: 111: Error importing data (-1) * 11:12:20 WARN <gnc.import.aqbanking> gnc_file_aqbanking_import: Error on import Expected results: Does this happen every time? yes Other information: I did the following: --- src/import-export/aqbanking/gnc-file-aqb-import.c~ 2008-07-23 00:43:06.000000000 +0200 +++ src/import-export/aqbanking/gnc-file-aqb-import.c 2008-10-31 11:08:45.000000000 +0100 @@ -163,7 +163,7 @@ } /* Run the import */ - if (AB_ImExporter_Import(importer, context, buffio, db_profile, 0)) { + if (AB_ImExporter_Import(importer, context, io, db_profile, 0)) { g_warning("gnc_file_aqbanking_import: Error on import"); goto cleanup; } And things started working for me again. see: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=492999 https://devel.aqbanking.de/trac/aqbanking/ticket/29
also note that the codepath around: src/import-export/hbci/gnc-file-aqb-import.c:167 is different then for the aqbanking importer. eg. It uses GWEN_BufferedIO_SetReadBuffer instead of GWEN_Io_LayerBuffered_new. I don't know what that means, but it might be that that's why hbci is working and mt940 import isn't.
Created attachment 121728 [details] sample 940 file. Works with my patch, doesn't work with buffered IO
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 557374 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=558645. Please update any external references or bookmarks.