[GNC] Session Error: failed to get_backend using access method "C"

Lipp F. flipp31a at gmail.com
Wed Jul 1 12:56:16 EDT 2020


As long as the path to the book file does not have a directory,
everything works fine. I mentioned that in an earlier message.

On Wed, Jul 1, 2020 at 12:30 PM Chris Graves <mohavebaked at gmail.com> wrote:

> Just as a point of reference, running the report on Win 10 from Powershell
> works fine for me with GC files of XML and Sqlite3.
>
> 'C:\Program Files (x86)\gnucash\bin\gnucash-cli.exe' --report run
> --name='Net Worth Linechart' --output=rpt.html sqlite.gnucash
>
> Chris
>
> On Wed, Jul 1, 2020 at 9:20 AM Geert Janssens <geert.gnucash at kobaltwit.be>
> wrote:
>
>> Op woensdag 1 juli 2020 17:52:48 CEST schreef Lipp F.:
>> > It is a bug indeed. Standard Windows path works fine in some parts of
>> the
>> > code but not everywhere. You can see the book file loaded and
>> identified as
>> > sqlite3. See logs below.
>> >
>> While the logs may lead to that conclusion I'm not so sure that is really
>> the case.
>>
>> When a file is loaded (as opposed to a URI for an actual database server)
>> gnucash doesn't know
>> beforehand what type of data is in there. So it will ask each backend in
>> turn (sqlite3 or xml). The
>> logs show the sqlite3 backend trying to find the file. But that's before
>> it can determine whether
>> the file is really sqlite3. On successful loading (which didn't happen
>> here), the first thing the
>> backend would do is evaluate whether it can parse the file. If not, just
>> backs off and passes the
>> file to the next available backend (which would be xml). However in this
>> case the backend failed
>> to even locate the file, so it aborts file loading with an error.
>>
>> Back to the issue though. I asked you whether you see the same thing if
>> you try to load the file
>> in gnucash rather than gnucash-cli (I would expect so), and whether this
>> already is the case on
>> gnucash 3.x. I would like to know to determine whether it's a regression
>> or a long-standing bug.
>> That helps when trying to fix it.
>>
>> My example commands were a little mixed up unfortunately. Here they are
>> again:
>>
>> C:\tools\gnucash\bin>gnucash.exe /C/Users/*****/Downloads/gnuCash-test-2/
>> t14.sqlite3.gnucash
>>
>> C:\tools\gnucash\bin>gnucash.exe C:\Users\*****\Downloads\gnuCash-
>> test-2\t14.sqlite3.gnucash
>>
>> Note there's an additional format you can use to pass file names. You can
>> try:
>> sqlite3:///c/Users/*****/Downloads.gnucash-test-2/t14.sqlite3.gnucash
>> or perhaps
>> sqlite3://c:\Users\*****\Downloads.gnucash-test-2\t14.sqlite3.gnucash
>>
>> I can't test right now myself which one is the exact right one.
>>
>> Regards,
>>
>> Geert
>>
>> >
>> > C:\tools\gnucash\bin>gnucash-cli.exe --debug --report run --name="Net
>> Worth
>> > Linechart" --output-file=r-nwl.html
>> > 'C:\Users\******\Downloads\gnuCash-test-2\t14.sqlite3.gnucash'
>> > * 11:46:50  INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi]
>> > GNC_DBD_DIR not set: using libdbi built-in default
>> > * 11:46:51  INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] 3 DBD
>> > drivers found
>> > * 11:46:51  INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver:
>> > mysql
>> > * 11:46:51  INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver:
>> > pgsql
>> > * 11:46:51  INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver:
>> > sqlite3
>> > * 11:46:51  INFO <gnc.gui> [Gnucash::CoreApp::start] System locale
>> returned
>> > (null)
>> > * 11:46:51  INFO <gnc.gui> [Gnucash::CoreApp::start] Effective locale
>> set
>> > to English_United States.1252.
>> > * 11:46:51  INFO <gnc.engine> [gnc_hook_num_args] no hook lists
>> > * 11:46:51 MESSG <gnc.report.core> loading saved reports
>> > * 11:46:51 MESSG <gnc.report.core> loading stylesheets
>> > * 11:46:51  INFO <gnc.app-utils.gsettings> [gnc_gsettings_register_cb]
>> > schema: general, key: retain-days, settings_ptr: 01534078, handler_id: 1
>> > * 11:46:51  INFO <gnc.app-utils.gsettings> [gnc_gsettings_register_cb]
>> > schema: general, key: retain-type-never, settings_ptr: 01534078,
>> > handler_id: 2
>> > * 11:46:51  INFO <gnc.app-utils.gsettings> [gnc_gsettings_register_cb]
>> > schema: general, key: retain-type-days, settings_ptr: 01534078,
>> handler_id:
>> > 3
>> > * 11:46:51  INFO <gnc.app-utils.gsettings> [gnc_gsettings_register_cb]
>> > schema: general, key: retain-type-forever, settings_ptr: 01534078,
>> > handler_id: 4
>> > * 11:46:52  INFO <gnc.app-utils.gsettings> [gnc_gsettings_register_cb]
>> > schema: general, key: file-compression, settings_ptr: 01534078,
>> handler_id:
>> > 5
>> > * 11:46:52  INFO <gnc.gui> [scm_run_report] Loading datafile
>> > 'C:\Users\******\Downloads\gnuCash-test-2\t14.sqlite3.gnucash'...
>> > * 11:46:52  INFO <gnc.account> [xaccAccountRecomputeBalance]
>> acct=Template
>> > Root starting baln=0/1
>> > * 11:46:52  INFO <gnc.commodity> [gnc_commodity_table_insert] insert
>> > 0726ec30 template into nsp=0702b1a0 template
>> > * 11:46:52  INFO <gnc.commodity> [gnc_commodity_table_insert] insert
>> > 097add18 ADF into nsp=0702b220 CURRENCY
>> > * 11:46:52  INFO <gnc.commodity> [gnc_commodity_table_insert] insert
>> > 097adcf8 ADP into nsp=0702b220 CURRENCY
>> > * 11:46:52  INFO <gnc.commodity> [gnc_commodity_table_insert] insert
>> > 097adc08 AED into nsp=0702b220 CURRENCY
>> > .....................
>> > * 11:47:02  INFO <gnc.commodity> [gnc_commodity_table_insert] insert
>> > 098a4228 XPD into nsp=0702b220 CURRENCY
>> > * 11:47:02  INFO <gnc.commodity> [gnc_commodity_table_insert] insert
>> > 098a4258 XPT into nsp=0702b220 CURRENCY
>> > * 11:47:02  INFO <gnc.commodity> [gnc_commodity_table_insert] insert
>> > 098a42a8 XSU into nsp=0702b220 CURRENCY
>> > * 11:47:02  INFO <qof.session> [QofSessionImpl::load_backend]  Selected
>> > provider GnuCash Libdbi (SQLITE3) Backend
>> > * 11:47:02  INFO <gnc.backend.dbi>
>> > [QofDbiBackendProvider<Type>::type_check] doesn't exist (errno=5) -> DBI
>> > * 11:47:02  WARN <gnc.backend.dbi>
>> [GncDbiBackend<Type>::session_begin()]
>> > Sqlite3 file
>> 'C:\Users\******\Downloads\gnuCash-test-2\t14.sqlite3.gnucash'
>> > not found
>> > * 11:47:02  INFO <qof.session> [QofSessionImpl::begin] Done running
>> > session_begin on backend
>> > * 11:47:02 ERROR <gnc.gui> [scm_cleanup_and_exit_with_failure()] Session
>> > Error: Sqlite3 file
>> > 'C:\Users\******\Downloads\gnuCash-test-2\t14.sqlite3.gnucash' not found
>> > * 11:47:02  INFO <qof.engine> [qof_collection_foreach] Hash Table size
>> of
>> > gncVendor before is 0
>> > * 11:47:02  INFO <qof.engine> [qof_collection_foreach] Hash Table size
>> of
>> > gncVendor after is 0
>> > * 11:47:02  INFO <qof.engine> [qof_collection_foreach] Hash Table size
>> of
>> > gncEntry before is 0
>> > * 11:47:02  INFO <qof.engine> [qof_collection_foreach] Hash Table size
>> of
>> > gncEntry after is 0
>> > * 11:47:02  INFO <qof.engine> [qof_collection_foreach] Hash Table size
>> of
>> > gncEmployee before is 0
>> > * 11:47:02  INFO <qof.engine> [qof_collection_foreach] Hash Table size
>> of
>> > gncEmployee after is 0
>> > * 11:47:02  INFO <qof.engine> [qof_collection_foreach] Hash Table size
>> of
>> > gncCustomer before is 0
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see
>> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>>
>


More information about the gnucash-user mailing list