Re: GnuCash import difficulty and interim solution

2024-01-07 Thread Jack via KMyMoney-devel
On my Linux box, that is part of the Qt Cryptographic Architecture  
(QCA) package.  Per https://userbase.kde.org/QCA, it is available for  
MacOS.



On 2024.01.07 08:00, Jonathan Kimmitt via KMyMoney-devel wrote:
I tried to follow the instructions to build the master branch, but it  
failed saying that qca-qt5-config.cmake was not found.

Perhaps this is an Apple-Silicon issue.

On 7 Jan 2024, at 11:36, Thomas Baumgart via KMyMoney-devel  
 wrote:


On Sonntag, 7. Januar 2024 11:30:30 CET Thomas Baumgart via  
KMyMoney-devel wrote:


[...]

The master branch version has other problems after the dialog is left
but that is something we need to find out. They may be related to  
other

changes made to KMyMoney in the meantime.

This is now fixed with  
https://invent.kde.org/office/kmymoney/-/commit/352e9f6b


--

Regards

Thomas Baumgart


Re: GnuCash import difficulty and interim solution

2024-01-07 Thread Jonathan Kimmitt via KMyMoney-devel
I tried to follow the instructions to build the master branch, but it failed 
saying that qca-qt5-config.cmake was not found.
Perhaps this is an Apple-Silicon issue.

On 7 Jan 2024, at 11:36, Thomas Baumgart via KMyMoney-devel 
 wrote:

On Sonntag, 7. Januar 2024 11:30:30 CET Thomas Baumgart via KMyMoney-devel 
wrote:

[...]

The master branch version has other problems after the dialog is left
but that is something we need to find out. They may be related to other
changes made to KMyMoney in the meantime.

This is now fixed with https://invent.kde.org/office/kmymoney/-/commit/352e9f6b

--

Regards

Thomas Baumgart

-
I don't think any of us need any help in this regard, getting
rid of money is probably the single most userfriendly interface
since breast-feeding... unfortunately. -- A.J. Venter
-



Re: GnuCash import difficulty and interim solution

2024-01-07 Thread Thomas Baumgart via KMyMoney-devel
On Sonntag, 7. Januar 2024 11:30:30 CET Thomas Baumgart via KMyMoney-devel 
wrote:

[...]

> The master branch version has other problems after the dialog is left
> but that is something we need to find out. They may be related to other
> changes made to KMyMoney in the meantime.

This is now fixed with https://invent.kde.org/office/kmymoney/-/commit/352e9f6b

-- 

Regards

Thomas Baumgart

-
I don't think any of us need any help in this regard, getting
rid of money is probably the single most userfriendly interface
since breast-feeding... unfortunately. -- A.J. Venter
-


signature.asc
Description: This is a digitally signed message part.


Re: GnuCash import difficulty and interim solution

2024-01-07 Thread Thomas Baumgart via KMyMoney-devel
Jonathan,

thanks for the samples. They did the trick. I was able to reproduce the
problem.

My previous code analysis was based on the master code base but not the
stable version which you are using. Since I did not remember any changes
on the GNC importer I thought it would be enough. Apparently not :) 
Comparing both versions I found out, that the stable importer only
works on compressed files.

After a simple

  gzip example.gnucash
  kmymoney example.gnucash

the importer kicked in and showed me said dialog. Also it imported the
file (no idea if correct or not - have not checked that).

The master branch version has other problems after the dialog is left
but that is something we need to find out. They may be related to other
changes made to KMyMoney in the meantime.

Hope that helps you moving forward.

Thomas


On Sonntag, 7. Januar 2024 09:12:59 CET Jonathan Kimmitt via KMyMoney-devel 
wrote:

> 
> Here is an example file created without personally identifiable data. It 
> still shows the same problem. I also attach the output of my converter for 
> reference.
> Not sure if attachments will be scrubbed.
> 
> On 7 Jan 2024, at 07:24, Jonathan Kimmitt  wrote:
> 
> This is the head of my file:
> 
> 
>   xmlns:gnc="http://www.gnucash.org/XML/gnc;
>  xmlns:act="http://www.gnucash.org/XML/act;
>  xmlns:book="http://www.gnucash.org/XML/book;
>  xmlns:cd="http://www.gnucash.org/XML/cd;
>  xmlns:cmdty="http://www.gnucash.org/XML/cmdty;
>  xmlns:price="http://www.gnucash.org/XML/price;
>  xmlns:slot="http://www.gnucash.org/XML/slot;
>  xmlns:split="http://www.gnucash.org/XML/split;
>  xmlns:sx="http://www.gnucash.org/XML/sx;
>  xmlns:trn="http://www.gnucash.org/XML/trn;
>  xmlns:ts="http://www.gnucash.org/XML/ts;
>  xmlns:fs="http://www.gnucash.org/XML/fs;
>  xmlns:bgt="http://www.gnucash.org/XML/bgt;
>  xmlns:recurrence="http://www.gnucash.org/XML/recurrence;
>  xmlns:lot="http://www.gnucash.org/XML/lot;
>  xmlns:addr="http://www.gnucash.org/XML/addr;
>  xmlns:billterm="http://www.gnucash.org/XML/billterm;
>  xmlns:bt-days="http://www.gnucash.org/XML/bt-days;
>  xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox;
>  xmlns:cust="http://www.gnucash.org/XML/cust;
>  xmlns:employee="http://www.gnucash.org/XML/employee;
>  xmlns:entry="http://www.gnucash.org/XML/entry;
>  xmlns:invoice="http://www.gnucash.org/XML/invoice;
>  xmlns:job="http://www.gnucash.org/XML/job;
>  xmlns:order="http://www.gnucash.org/XML/order;
>  xmlns:owner="http://www.gnucash.org/XML/owner;
>  xmlns:taxtable="http://www.gnucash.org/XML/taxtable;
>  xmlns:tte="http://www.gnucash.org/XML/tte;
>  xmlns:vendor="http://www.gnucash.org/XML/vendor;>
> 1
> 
> 
> 
> On 6 Jan 2024, at 23:36, Jack via KMyMoney-devel  
> wrote:
> 
> Can you open the file in a text editor and confirm that it meets the criteria 
> Thomas listed, specifically that the string " digits" occurs within the first 70 bytes of the file?
> 
> On 2024.01.06 17:29, Jonathan Kimmitt via KMyMoney-devel wrote:
> I see no dialogue box. My gnucash XML file is uncompressed. My file is chosen 
> from a pop up window so it must exist. I can try the Linux version another 
> time to see if there are terminal messages. However my GnuCash is v5.4 and 
> the documentation says that the importer was designed for v2.x
> Sent from my iPhone
> > On 6 Jan 2024, at 21:40, Thomas Baumgart via KMyMoney-devel 
> >  wrote:
> >
> > On Samstag, 6. Januar 2024 18:24:47 CET Jack via KMyMoney-devel wrote:
> >
> >>> On 1/6/24 12:17, Jonathan Kimmitt wrote:
> >>> Yes, it is present and has version GNC Importer Version 5.1.3-33a66be8a. 
> >>> Under OSX it’s in KMyMoney preferences instead of Setting
> >>>
> >>> It’s probably something stupid like an account or payee name with an & in 
> >>> is represented unadorned in the XML whereas KMyMoney requires 
> >> That is certainly possible, but I'll have to look into the code to see
> >> what exactly triggers that particular error message.  If you are right,
> >> then we would want to find a utility that checks XML files for proper
> >> encoding/markup (I can't think of the exact term right now.)
> >
> > Encoding and structure are the two important things. xmllint would be the 
> > tool to use.
> >
> > I scanned the GNC plugin's open() call real quick. Here is what it checks:
> >
> > - file is not a database (e.g. SQL, SQLite, ...)
> > - file is on local drive (url starts with file://)
> > - file is readable
> > - if file is gzip compressed (first two bytes are "\037\213") it re-opens it
> >  for decompression
> > - first bytes in file are not "SQ"
> > - the first 70 bytes of the file must contain the regex " >
> > In case all that is true, a dialog is shown. This contains a switch
> > to turn on debug messages which are printed to the console (in case
> > KMyMoney was started via terminal) while the file is parsed. Now I have
> > two questions: Does 

Re: GnuCash import difficulty and interim solution

2024-01-07 Thread Thomas Baumgart via KMyMoney-devel
Never mind, saw your mail to the list with the content too late :) Seems I need 
another coffee.

On Sonntag, 7. Januar 2024 10:25:36 CET Thomas Baumgart via KMyMoney-devel 
wrote:

> Thanks for the answers. If no dialog is shown, then one of the checks fails. 
> We simply need to find out what it is. Can you provide the first 70-100 
> characters of the file here? There should not be any confidential data in 
> that part.
> 
> On Samstag, 6. Januar 2024 23:29:28 CET Jonathan Kimmitt wrote:
> 
> > I see no dialogue box. My gnucash XML file is uncompressed. My file is 
> > chosen from a pop up window so it must exist. I can try the Linux version 
> > another time to see if there are terminal messages. However my GnuCash is 
> > v5.4 and the documentation says that the importer was designed for v2.x
> > 
> > Sent from my iPhone
> > 
> > > On 6 Jan 2024, at 21:40, Thomas Baumgart via KMyMoney-devel 
> > >  wrote:
> > > 
> > > On Samstag, 6. Januar 2024 18:24:47 CET Jack via KMyMoney-devel wrote:
> > > 
> > >>> On 1/6/24 12:17, Jonathan Kimmitt wrote:
> > >>> Yes, it is present and has version GNC Importer Version 
> > >>> 5.1.3-33a66be8a. Under OSX it’s in KMyMoney preferences instead of 
> > >>> Setting
> > >>> 
> > >>> It’s probably something stupid like an account or payee name with an & 
> > >>> in is represented unadorned in the XML whereas KMyMoney requires 
> > >> That is certainly possible, but I'll have to look into the code to see
> > >> what exactly triggers that particular error message.  If you are right,
> > >> then we would want to find a utility that checks XML files for proper
> > >> encoding/markup (I can't think of the exact term right now.)
> > > 
> > > Encoding and structure are the two important things. xmllint would be the 
> > > tool to use.
> > > 
> > > I scanned the GNC plugin's open() call real quick. Here is what it checks:
> > > 
> > > - file is not a database (e.g. SQL, SQLite, ...)
> > > - file is on local drive (url starts with file://)
> > > - file is readable
> > > - if file is gzip compressed (first two bytes are "\037\213") it re-opens 
> > > it
> > >  for decompression
> > > - first bytes in file are not "SQ"
> > > - the first 70 bytes of the file must contain the regex " > > 
> > > In case all that is true, a dialog is shown. This contains a switch
> > > to turn on debug messages which are printed to the console (in case
> > > KMyMoney was started via terminal) while the file is parsed. Now I have
> > > two questions: Does the dialog is shown? Do these debug messages provide
> > > any hint or details why the import fails?
> > > 
> > > Thomas
> > > 
> > > 
> > > 
> > > 
> >  On 6 Jan 2024, at 17:10, Jack via KMyMoney-devel 
> >   wrote:
> >  
> >  On 1/6/24 11:40, Jonathan Kimmitt via KMyMoney-devel wrote:
> > > Hi Jack,
> > >   I am using Apple M1 macOS 14.2.1 (23C71), with GnuCash Version: 5.4 
> > > Build ID: 5.4+(2023-09-23) and KMyMoney Version 5.1.3-33a66be8a
> > > 
> > > The converter was written with OCaml 5.0.0 but I would not expect any 
> > > lack of portability for the XML handling.
> > > 
> > > The error when trying to open the GnuCash XML  in the GUI was:
> > > Could not read your data source. Please check the KMyMoney settings 
> > > that the necessary plugin is enabled.
> > > 
> > > Based on what Mark was saying, it sounds like the failure is 
> > > something quite trivial, however I lack the knowledge to debug it.
> > > 
> > > Regards,
> > > Jonathan
> >  I'll have to do some digging, but the first step would be to assure 
> >  the file can be read.  If it is on a local drive and you can look at 
> >  it in a text editor, then that's OK.  The next step would be to assure 
> >  that the guncash importer is present and enabled.  Go to 
> >  Setting/Configure KMyMoney... select Plugins on the left side, and see 
> >  if GNC Importer is present on the right.  If it's there, then we do 
> >  have an interesting problem.  If it is NOT present, then we need to 
> >  figure out why not.  I just confirmed it IS present in the Appimage 
> >  versions, but I don't know about the macOS version.
> > >> 
> > >> 
> > > 
> > > --
> > > 
> > > Regards
> > > 
> > > Thomas Baumgart
> > > 
> > > -
> > > Ilde servers are the devil's work -- robbyoconnor on #irc
> > > -
> > 
> 
> 

-- 

Regards

Thomas Baumgart

-
C makes it easy for you to shoot yourself in the foot. C++ makes that
harder, but when you do, it blows away your whole leg.
 -- Bjarne Stroustrup
-


signature.asc
Description: This is a digitally signed message part.


Re: GnuCash import difficulty and interim solution

2024-01-07 Thread Thomas Baumgart via KMyMoney-devel
Thanks for the answers. If no dialog is shown, then one of the checks fails. We 
simply need to find out what it is. Can you provide the first 70-100 characters 
of the file here? There should not be any confidential data in that part.

On Samstag, 6. Januar 2024 23:29:28 CET Jonathan Kimmitt wrote:

> I see no dialogue box. My gnucash XML file is uncompressed. My file is chosen 
> from a pop up window so it must exist. I can try the Linux version another 
> time to see if there are terminal messages. However my GnuCash is v5.4 and 
> the documentation says that the importer was designed for v2.x
> 
> Sent from my iPhone
> 
> > On 6 Jan 2024, at 21:40, Thomas Baumgart via KMyMoney-devel 
> >  wrote:
> > 
> > On Samstag, 6. Januar 2024 18:24:47 CET Jack via KMyMoney-devel wrote:
> > 
> >>> On 1/6/24 12:17, Jonathan Kimmitt wrote:
> >>> Yes, it is present and has version GNC Importer Version 5.1.3-33a66be8a. 
> >>> Under OSX it’s in KMyMoney preferences instead of Setting
> >>> 
> >>> It’s probably something stupid like an account or payee name with an & in 
> >>> is represented unadorned in the XML whereas KMyMoney requires 
> >> That is certainly possible, but I'll have to look into the code to see
> >> what exactly triggers that particular error message.  If you are right,
> >> then we would want to find a utility that checks XML files for proper
> >> encoding/markup (I can't think of the exact term right now.)
> > 
> > Encoding and structure are the two important things. xmllint would be the 
> > tool to use.
> > 
> > I scanned the GNC plugin's open() call real quick. Here is what it checks:
> > 
> > - file is not a database (e.g. SQL, SQLite, ...)
> > - file is on local drive (url starts with file://)
> > - file is readable
> > - if file is gzip compressed (first two bytes are "\037\213") it re-opens it
> >  for decompression
> > - first bytes in file are not "SQ"
> > - the first 70 bytes of the file must contain the regex " > 
> > In case all that is true, a dialog is shown. This contains a switch
> > to turn on debug messages which are printed to the console (in case
> > KMyMoney was started via terminal) while the file is parsed. Now I have
> > two questions: Does the dialog is shown? Do these debug messages provide
> > any hint or details why the import fails?
> > 
> > Thomas
> > 
> > 
> > 
> > 
>  On 6 Jan 2024, at 17:10, Jack via KMyMoney-devel 
>   wrote:
>  
>  On 1/6/24 11:40, Jonathan Kimmitt via KMyMoney-devel wrote:
> > Hi Jack,
> >   I am using Apple M1 macOS 14.2.1 (23C71), with GnuCash Version: 5.4 
> > Build ID: 5.4+(2023-09-23) and KMyMoney Version 5.1.3-33a66be8a
> > 
> > The converter was written with OCaml 5.0.0 but I would not expect any 
> > lack of portability for the XML handling.
> > 
> > The error when trying to open the GnuCash XML  in the GUI was:
> > Could not read your data source. Please check the KMyMoney settings 
> > that the necessary plugin is enabled.
> > 
> > Based on what Mark was saying, it sounds like the failure is something 
> > quite trivial, however I lack the knowledge to debug it.
> > 
> > Regards,
> > Jonathan
>  I'll have to do some digging, but the first step would be to assure the 
>  file can be read.  If it is on a local drive and you can look at it in a 
>  text editor, then that's OK.  The next step would be to assure that the 
>  guncash importer is present and enabled.  Go to Setting/Configure 
>  KMyMoney... select Plugins on the left side, and see if GNC Importer is 
>  present on the right.  If it's there, then we do have an interesting 
>  problem.  If it is NOT present, then we need to figure out why not.  I 
>  just confirmed it IS present in the Appimage versions, but I don't know 
>  about the macOS version.
> >> 
> >> 
> > 
> > --
> > 
> > Regards
> > 
> > Thomas Baumgart
> > 
> > -
> > Ilde servers are the devil's work -- robbyoconnor on #irc
> > -
> 

-- 

Regards

Thomas Baumgart

-
Bachelor: One who is footloose & fiance free!
-


signature.asc
Description: This is a digitally signed message part.


Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Jonathan Kimmitt via KMyMoney-devel
This is the head of my file:




http://www.gnucash.org/XML/gnc;

 xmlns:act="http://www.gnucash.org/XML/act;

 xmlns:book="http://www.gnucash.org/XML/book;

 xmlns:cd="http://www.gnucash.org/XML/cd;

 xmlns:cmdty="http://www.gnucash.org/XML/cmdty;

 xmlns:price="http://www.gnucash.org/XML/price;

 xmlns:slot="http://www.gnucash.org/XML/slot;

 xmlns:split="http://www.gnucash.org/XML/split;

 xmlns:sx="http://www.gnucash.org/XML/sx;

 xmlns:trn="http://www.gnucash.org/XML/trn;

 xmlns:ts="http://www.gnucash.org/XML/ts;

 xmlns:fs="http://www.gnucash.org/XML/fs;

 xmlns:bgt="http://www.gnucash.org/XML/bgt;

 xmlns:recurrence="http://www.gnucash.org/XML/recurrence;

 xmlns:lot="http://www.gnucash.org/XML/lot;

 xmlns:addr="http://www.gnucash.org/XML/addr;

 xmlns:billterm="http://www.gnucash.org/XML/billterm;

 xmlns:bt-days="http://www.gnucash.org/XML/bt-days;

 xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox;

 xmlns:cust="http://www.gnucash.org/XML/cust;

 xmlns:employee="http://www.gnucash.org/XML/employee;

 xmlns:entry="http://www.gnucash.org/XML/entry;

 xmlns:invoice="http://www.gnucash.org/XML/invoice;

 xmlns:job="http://www.gnucash.org/XML/job;

 xmlns:order="http://www.gnucash.org/XML/order;

 xmlns:owner="http://www.gnucash.org/XML/owner;

 xmlns:taxtable="http://www.gnucash.org/XML/taxtable;

 xmlns:tte="http://www.gnucash.org/XML/tte;

 xmlns:vendor="http://www.gnucash.org/XML/vendor;>

1




On 6 Jan 2024, at 23:36, Jack via KMyMoney-devel  wrote:

Can you open the file in a text editor and confirm that it meets the criteria 
Thomas listed, specifically that the string " On 6 Jan 2024, at 21:40, Thomas Baumgart via KMyMoney-devel 
>  wrote:
>
> On Samstag, 6. Januar 2024 18:24:47 CET Jack via KMyMoney-devel wrote:
>
>>> On 1/6/24 12:17, Jonathan Kimmitt wrote:
>>> Yes, it is present and has version GNC Importer Version 5.1.3-33a66be8a. 
>>> Under OSX it’s in KMyMoney preferences instead of Setting
>>>
>>> It’s probably something stupid like an account or payee name with an & in 
>>> is represented unadorned in the XML whereas KMyMoney requires 
>> That is certainly possible, but I'll have to look into the code to see
>> what exactly triggers that particular error message.  If you are right,
>> then we would want to find a utility that checks XML files for proper
>> encoding/markup (I can't think of the exact term right now.)
>
> Encoding and structure are the two important things. xmllint would be the 
> tool to use.
>
> I scanned the GNC plugin's open() call real quick. Here is what it checks:
>
> - file is not a database (e.g. SQL, SQLite, ...)
> - file is on local drive (url starts with file://)
> - file is readable
> - if file is gzip compressed (first two bytes are "\037\213") it re-opens it
>  for decompression
> - first bytes in file are not "SQ"
> - the first 70 bytes of the file must contain the regex "
> In case all that is true, a dialog is shown. This contains a switch
> to turn on debug messages which are printed to the console (in case
> KMyMoney was started via terminal) while the file is parsed. Now I have
> two questions: Does the dialog is shown? Do these debug messages provide
> any hint or details why the import fails?
>
> Thomas
>
>
>
>
 On 6 Jan 2024, at 17:10, Jack via KMyMoney-devel  
 wrote:

 On 1/6/24 11:40, Jonathan Kimmitt via KMyMoney-devel wrote:
> Hi Jack,
>   I am using Apple M1 macOS 14.2.1 (23C71), with GnuCash Version: 5.4 
> Build ID: 5.4+(2023-09-23) and KMyMoney Version 5.1.3-33a66be8a
>
> The converter was written with OCaml 5.0.0 but I would not expect any 
> lack of portability for the XML handling.
>
> The error when trying to open the GnuCash XML  in the GUI was:
> Could not read your data source. Please check the KMyMoney settings that 
> the necessary plugin is enabled.
>
> Based on what Mark was saying, it sounds like the failure is something 
> quite trivial, however I lack the knowledge to debug it.
>
> Regards,
> Jonathan
 I'll have to do some digging, but the first step would be to assure the 
 file can be read.  If it is on a local drive and you can look at it in a 
 text editor, then that's OK.  The next step would be to assure that the 
 guncash importer is present and enabled.  Go to Setting/Configure 
 KMyMoney... select Plugins on the left side, and see if GNC Importer is 
 present on the right.  If it's there, then we do have an interesting 
 problem.  If it is NOT present, then we need to figure out why not.  I 
 just confirmed it IS present in the Appimage versions, but I don't know 
 about the macOS version.
>>
>>
>
> --
>
> Regards
>
> Thomas Baumgart
>
> -
> Ilde servers are the devil's work -- robbyoconnor on #irc
> 

Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Jack via KMyMoney-devel
Can you open the file in a text editor and confirm that it meets the  
criteria Thomas listed, specifically that the string "by one or more digits" occurs within the first 70 bytes of the file?


On 2024.01.06 17:29, Jonathan Kimmitt via KMyMoney-devel wrote:
I see no dialogue box. My gnucash XML file is uncompressed. My file  
is chosen from a pop up window so it must exist. I can try the Linux  
version another time to see if there are terminal messages. However  
my GnuCash is v5.4 and the documentation says that the importer was  
designed for v2.x


Sent from my iPhone

> On 6 Jan 2024, at 21:40, Thomas Baumgart via KMyMoney-devel  
 wrote:

>
> On Samstag, 6. Januar 2024 18:24:47 CET Jack via KMyMoney-devel  
wrote:

>
>>> On 1/6/24 12:17, Jonathan Kimmitt wrote:
>>> Yes, it is present and has version GNC Importer Version  
5.1.3-33a66be8a. Under OSX it’s in KMyMoney preferences instead of  
Setting

>>>
>>> It’s probably something stupid like an account or payee name with  
an & in is represented unadorned in the XML whereas KMyMoney requires  

>> That is certainly possible, but I'll have to look into the code to  
see
>> what exactly triggers that particular error message.  If you are  
right,
>> then we would want to find a utility that checks XML files for  
proper

>> encoding/markup (I can't think of the exact term right now.)
>
> Encoding and structure are the two important things. xmllint would  
be the tool to use.

>
> I scanned the GNC plugin's open() call real quick. Here is what it  
checks:

>
> - file is not a database (e.g. SQL, SQLite, ...)
> - file is on local drive (url starts with file://)
> - file is readable
> - if file is gzip compressed (first two bytes are "\037\213") it  
re-opens it

>  for decompression
> - first bytes in file are not "SQ"
> - the first 70 bytes of the file must contain the regex  
"
>
> In case all that is true, a dialog is shown. This contains a switch
> to turn on debug messages which are printed to the console (in case
> KMyMoney was started via terminal) while the file is parsed. Now I  
have
> two questions: Does the dialog is shown? Do these debug messages  
provide

> any hint or details why the import fails?
>
> Thomas
>
>
>
>
 On 6 Jan 2024, at 17:10, Jack via KMyMoney-devel  
 wrote:


 On 1/6/24 11:40, Jonathan Kimmitt via KMyMoney-devel wrote:
> Hi Jack,
>   I am using Apple M1 macOS 14.2.1 (23C71), with GnuCash  
Version: 5.4 Build ID: 5.4+(2023-09-23) and KMyMoney Version  
5.1.3-33a66be8a

>
> The converter was written with OCaml 5.0.0 but I would not  
expect any lack of portability for the XML handling.

>
> The error when trying to open the GnuCash XML  in the GUI was:
> Could not read your data source. Please check the KMyMoney  
settings that the necessary plugin is enabled.

>
> Based on what Mark was saying, it sounds like the failure is  
something quite trivial, however I lack the knowledge to debug it.

>
> Regards,
> Jonathan
 I'll have to do some digging, but the first step would be to  
assure the file can be read.  If it is on a local drive and you can  
look at it in a text editor, then that's OK.  The next step would be  
to assure that the guncash importer is present and enabled.  Go to  
Setting/Configure KMyMoney... select Plugins on the left side, and  
see if GNC Importer is present on the right.  If it's there, then we  
do have an interesting problem.  If it is NOT present, then we need  
to figure out why not.  I just confirmed it IS present in the  
Appimage versions, but I don't know about the macOS version.

>>
>>
>
> --
>
> Regards
>
> Thomas Baumgart
>
> -
> Ilde servers are the devil's work -- robbyoconnor on #irc
> -





Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Jonathan Kimmitt via KMyMoney-devel
I see no dialogue box. My gnucash XML file is uncompressed. My file is chosen 
from a pop up window so it must exist. I can try the Linux version another time 
to see if there are terminal messages. However my GnuCash is v5.4 and the 
documentation says that the importer was designed for v2.x

Sent from my iPhone

> On 6 Jan 2024, at 21:40, Thomas Baumgart via KMyMoney-devel 
>  wrote:
> 
> On Samstag, 6. Januar 2024 18:24:47 CET Jack via KMyMoney-devel wrote:
> 
>>> On 1/6/24 12:17, Jonathan Kimmitt wrote:
>>> Yes, it is present and has version GNC Importer Version 5.1.3-33a66be8a. 
>>> Under OSX it’s in KMyMoney preferences instead of Setting
>>> 
>>> It’s probably something stupid like an account or payee name with an & in 
>>> is represented unadorned in the XML whereas KMyMoney requires 
>> That is certainly possible, but I'll have to look into the code to see
>> what exactly triggers that particular error message.  If you are right,
>> then we would want to find a utility that checks XML files for proper
>> encoding/markup (I can't think of the exact term right now.)
> 
> Encoding and structure are the two important things. xmllint would be the 
> tool to use.
> 
> I scanned the GNC plugin's open() call real quick. Here is what it checks:
> 
> - file is not a database (e.g. SQL, SQLite, ...)
> - file is on local drive (url starts with file://)
> - file is readable
> - if file is gzip compressed (first two bytes are "\037\213") it re-opens it
>  for decompression
> - first bytes in file are not "SQ"
> - the first 70 bytes of the file must contain the regex " 
> In case all that is true, a dialog is shown. This contains a switch
> to turn on debug messages which are printed to the console (in case
> KMyMoney was started via terminal) while the file is parsed. Now I have
> two questions: Does the dialog is shown? Do these debug messages provide
> any hint or details why the import fails?
> 
> Thomas
> 
> 
> 
> 
 On 6 Jan 2024, at 17:10, Jack via KMyMoney-devel  
 wrote:
 
 On 1/6/24 11:40, Jonathan Kimmitt via KMyMoney-devel wrote:
> Hi Jack,
>   I am using Apple M1 macOS 14.2.1 (23C71), with GnuCash Version: 5.4 
> Build ID: 5.4+(2023-09-23) and KMyMoney Version 5.1.3-33a66be8a
> 
> The converter was written with OCaml 5.0.0 but I would not expect any 
> lack of portability for the XML handling.
> 
> The error when trying to open the GnuCash XML  in the GUI was:
> Could not read your data source. Please check the KMyMoney settings that 
> the necessary plugin is enabled.
> 
> Based on what Mark was saying, it sounds like the failure is something 
> quite trivial, however I lack the knowledge to debug it.
> 
> Regards,
> Jonathan
 I'll have to do some digging, but the first step would be to assure the 
 file can be read.  If it is on a local drive and you can look at it in a 
 text editor, then that's OK.  The next step would be to assure that the 
 guncash importer is present and enabled.  Go to Setting/Configure 
 KMyMoney... select Plugins on the left side, and see if GNC Importer is 
 present on the right.  If it's there, then we do have an interesting 
 problem.  If it is NOT present, then we need to figure out why not.  I 
 just confirmed it IS present in the Appimage versions, but I don't know 
 about the macOS version.
>> 
>> 
> 
> --
> 
> Regards
> 
> Thomas Baumgart
> 
> -
> Ilde servers are the devil's work -- robbyoconnor on #irc
> -


Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Thomas Baumgart via KMyMoney-devel
On Samstag, 6. Januar 2024 18:24:47 CET Jack via KMyMoney-devel wrote:

> On 1/6/24 12:17, Jonathan Kimmitt wrote:
> > Yes, it is present and has version GNC Importer Version 5.1.3-33a66be8a. 
> > Under OSX it’s in KMyMoney preferences instead of Setting
> >
> > It’s probably something stupid like an account or payee name with an & in 
> > is represented unadorned in the XML whereas KMyMoney requires 
> That is certainly possible, but I'll have to look into the code to see 
> what exactly triggers that particular error message.  If you are right, 
> then we would want to find a utility that checks XML files for proper 
> encoding/markup (I can't think of the exact term right now.)

Encoding and structure are the two important things. xmllint would be the tool 
to use.

I scanned the GNC plugin's open() call real quick. Here is what it checks:

- file is not a database (e.g. SQL, SQLite, ...)
- file is on local drive (url starts with file://)
- file is readable
- if file is gzip compressed (first two bytes are "\037\213") it re-opens it
  for decompression
- first bytes in file are not "SQ"
- the first 70 bytes of the file must contain the regex " >> On 6 Jan 2024, at 17:10, Jack via KMyMoney-devel  
> >> wrote:
> >>
> >> On 1/6/24 11:40, Jonathan Kimmitt via KMyMoney-devel wrote:
> >>> Hi Jack,
> >>>I am using Apple M1 macOS 14.2.1 (23C71), with GnuCash Version: 5.4 
> >>> Build ID: 5.4+(2023-09-23) and KMyMoney Version 5.1.3-33a66be8a
> >>>
> >>> The converter was written with OCaml 5.0.0 but I would not expect any 
> >>> lack of portability for the XML handling.
> >>>
> >>> The error when trying to open the GnuCash XML  in the GUI was:
> >>> Could not read your data source. Please check the KMyMoney settings that 
> >>> the necessary plugin is enabled.
> >>>
> >>> Based on what Mark was saying, it sounds like the failure is something 
> >>> quite trivial, however I lack the knowledge to debug it.
> >>>
> >>> Regards,
> >>> Jonathan
> >> I'll have to do some digging, but the first step would be to assure the 
> >> file can be read.  If it is on a local drive and you can look at it in a 
> >> text editor, then that's OK.  The next step would be to assure that the 
> >> guncash importer is present and enabled.  Go to Setting/Configure 
> >> KMyMoney... select Plugins on the left side, and see if GNC Importer is 
> >> present on the right.  If it's there, then we do have an interesting 
> >> problem.  If it is NOT present, then we need to figure out why not.  I 
> >> just confirmed it IS present in the Appimage versions, but I don't know 
> >> about the macOS version.
> 
> 

-- 

Regards

Thomas Baumgart

-
Ilde servers are the devil's work -- robbyoconnor on #irc
-


signature.asc
Description: This is a digitally signed message part.


Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Jack via KMyMoney-devel

On 1/6/24 12:17, Jonathan Kimmitt wrote:

Yes, it is present and has version GNC Importer Version 5.1.3-33a66be8a. Under 
OSX it’s in KMyMoney preferences instead of Setting

It’s probably something stupid like an account or payee name with an & in is 
represented unadorned in the XML whereas KMyMoney requires 
That is certainly possible, but I'll have to look into the code to see 
what exactly triggers that particular error message.  If you are right, 
then we would want to find a utility that checks XML files for proper 
encoding/markup (I can't think of the exact term right now.)

On 6 Jan 2024, at 17:10, Jack via KMyMoney-devel  wrote:

On 1/6/24 11:40, Jonathan Kimmitt via KMyMoney-devel wrote:

Hi Jack,
   I am using Apple M1 macOS 14.2.1 (23C71), with GnuCash Version: 5.4 Build 
ID: 5.4+(2023-09-23) and KMyMoney Version 5.1.3-33a66be8a

The converter was written with OCaml 5.0.0 but I would not expect any lack of 
portability for the XML handling.

The error when trying to open the GnuCash XML  in the GUI was:
Could not read your data source. Please check the KMyMoney settings that the 
necessary plugin is enabled.

Based on what Mark was saying, it sounds like the failure is something quite 
trivial, however I lack the knowledge to debug it.

Regards,
Jonathan

I'll have to do some digging, but the first step would be to assure the file 
can be read.  If it is on a local drive and you can look at it in a text 
editor, then that's OK.  The next step would be to assure that the guncash 
importer is present and enabled.  Go to Setting/Configure KMyMoney... select 
Plugins on the left side, and see if GNC Importer is present on the right.  If 
it's there, then we do have an interesting problem.  If it is NOT present, then 
we need to figure out why not.  I just confirmed it IS present in the Appimage 
versions, but I don't know about the macOS version.


Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Jonathan Kimmitt via KMyMoney-devel
Yes, it is present and has version GNC Importer Version 5.1.3-33a66be8a. Under 
OSX it’s in KMyMoney preferences instead of Setting

It’s probably something stupid like an account or payee name with an & in is 
represented unadorned in the XML whereas KMyMoney requires 

> On 6 Jan 2024, at 17:10, Jack via KMyMoney-devel  
> wrote:
> 
> On 1/6/24 11:40, Jonathan Kimmitt via KMyMoney-devel wrote:
>> Hi Jack,
>>   I am using Apple M1 macOS 14.2.1 (23C71), with GnuCash Version: 5.4 Build 
>> ID: 5.4+(2023-09-23) and KMyMoney Version 5.1.3-33a66be8a
>> 
>> The converter was written with OCaml 5.0.0 but I would not expect any lack 
>> of portability for the XML handling.
>> 
>> The error when trying to open the GnuCash XML  in the GUI was:
>> Could not read your data source. Please check the KMyMoney settings that the 
>> necessary plugin is enabled.
>> 
>> Based on what Mark was saying, it sounds like the failure is something quite 
>> trivial, however I lack the knowledge to debug it.
>> 
>> Regards,
>> Jonathan
> I'll have to do some digging, but the first step would be to assure the file 
> can be read.  If it is on a local drive and you can look at it in a text 
> editor, then that's OK.  The next step would be to assure that the guncash 
> importer is present and enabled.  Go to Setting/Configure KMyMoney... select 
> Plugins on the left side, and see if GNC Importer is present on the right.  
> If it's there, then we do have an interesting problem.  If it is NOT present, 
> then we need to figure out why not.  I just confirmed it IS present in the 
> Appimage versions, but I don't know about the macOS version.



Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Jack via KMyMoney-devel

On 1/6/24 11:40, Jonathan Kimmitt via KMyMoney-devel wrote:

Hi Jack,
   I am using Apple M1 macOS 14.2.1 (23C71), with GnuCash Version: 5.4 Build 
ID: 5.4+(2023-09-23) and KMyMoney Version 5.1.3-33a66be8a

The converter was written with OCaml 5.0.0 but I would not expect any lack of 
portability for the XML handling.

The error when trying to open the GnuCash XML  in the GUI was:
Could not read your data source. Please check the KMyMoney settings that the 
necessary plugin is enabled.

Based on what Mark was saying, it sounds like the failure is something quite 
trivial, however I lack the knowledge to debug it.

Regards,
Jonathan
I'll have to do some digging, but the first step would be to assure the 
file can be read.  If it is on a local drive and you can look at it in a 
text editor, then that's OK.  The next step would be to assure that the 
guncash importer is present and enabled.  Go to Setting/Configure 
KMyMoney... select Plugins on the left side, and see if GNC Importer is 
present on the right.  If it's there, then we do have an interesting 
problem.  If it is NOT present, then we need to figure out why not.  I 
just confirmed it IS present in the Appimage versions, but I don't know 
about the macOS version.


Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Mark Penner via KMyMoney-devel
On Saturday, January 6, 2024 10:40:09 AM CST Jonathan Kimmitt via KMyMoney-
devel wrote:
> The error when trying to open the GnuCash XML  in the GUI was:
> Could not read your data source. Please check the KMyMoney settings that the
> necessary plugin is enabled.
> 
> Based on what Mark was saying, it sounds like the failure is something quite
> trivial, however I lack the knowledge to debug it.

That sounds familiar, now that you mention it, I think I ran into that before. 
Unfortunately, I can't remember what changed between then and now. I am also 
running KMyMoney 5.1.3, but on Debian unstable.




Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Jonathan Kimmitt via KMyMoney-devel
Hi Jack,
  I am using Apple M1 macOS 14.2.1 (23C71), with GnuCash Version: 5.4 Build ID: 
5.4+(2023-09-23) and KMyMoney Version 5.1.3-33a66be8a

The converter was written with OCaml 5.0.0 but I would not expect any lack of 
portability for the XML handling.

The error when trying to open the GnuCash XML  in the GUI was:
Could not read your data source. Please check the KMyMoney settings that the 
necessary plugin is enabled.

Based on what Mark was saying, it sounds like the failure is something quite 
trivial, however I lack the knowledge to debug it.

Regards,
Jonathan

> On 6 Jan 2024, at 16:23, Jack via KMyMoney-devel  
> wrote:
> 
> On 1/6/24 10:36, Jonathan Kimmitt via KMyMoney-devel wrote:
>> (*
>> Dear kMyMoney developers,
>>   I came across KMyMoney while looking for a replacement for the recently 
>> deceased QuickBooks Desktop.
>> Having gone to the trouble of converting my accounts from Quickbooks to 
>> GnuCash, I was a little disappointed
>> that the “open Gnucash XML file” feature didn’t seem to work. I offer you a 
>> crude standalone converter which someone
>> might be able to work up into a general purpose importer. Comments welcome. 
>> At the moment I don’t have non UK
>> currencies to work with. The extrapolation should be a simple exercise.
>> 
>> Regards,
>> Jonathan
>> *)
> 
> Thanks for the contribution.  I'll let others comment on how we might use it. 
>  However, my first question is what didn't work on trying to open a GnuCash 
> XML file.  Along with that, I'd ask what version of KMyMoney, and what 
> operating system/distribution are you using?
> 
> Thanks
> 
> Jack
> 



Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Mark via KMyMoney-devel
Jan 6, 2024 10:24:15 Jack via KMyMoney-devel :

> However, my first question is what didn't work on trying to open a GnuCash 
> XML file.

My question also. I am also currently using GnuCash and thinking about 
switching to KMyMoney. I have been able to open my GnuCash file, the only 
things that I noticed didn't convert were the things the documentation 
mentions, mainly some scheduled transactions in my case.


Re: GnuCash import difficulty and interim solution

2024-01-06 Thread Jack via KMyMoney-devel

On 1/6/24 10:36, Jonathan Kimmitt via KMyMoney-devel wrote:

(*
Dear kMyMoney developers,
   I came across KMyMoney while looking for a replacement for the recently 
deceased QuickBooks Desktop.
Having gone to the trouble of converting my accounts from Quickbooks to 
GnuCash, I was a little disappointed
that the “open Gnucash XML file” feature didn’t seem to work. I offer you a 
crude standalone converter which someone
might be able to work up into a general purpose importer. Comments welcome. At 
the moment I don’t have non UK
currencies to work with. The extrapolation should be a simple exercise.

Regards,
Jonathan
*)


Thanks for the contribution.  I'll let others comment on how we might 
use it.  However, my first question is what didn't work on trying to 
open a GnuCash XML file.  Along with that, I'd ask what version of 
KMyMoney, and what operating system/distribution are you using?


Thanks

Jack