Re: [GNC] save as sqlite3 error

2021-10-23 Thread Public Address
Thanks, interesting that deleting the “NULL” text and leaving it empty allowed 
it to go through.

“but direct database manipulation may void your GnuCash warranty.”

I was thinking about direct upload to the postgres table (creating my own guid 
and checking for duplication) but that doesn’t sound like a good idea?

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows

From: Geoff<mailto:cleanoutmys...@gmail.com>
Sent: 20 October 2021 11:15
To: Public Address<mailto:public.addr...@hotmail.co.uk>; David 
Carlson<mailto:david.carlson@gmail.com>
Cc: gnucash-user@gnucash.org<mailto:gnucash-user@gnucash.org>
Subject: Re: [GNC] save as sqlite3 error

That would do it - the schema prohibits NULLs.

I don't believe it is possible to import securities, it is not an option
on the Import menu.  Depending how many you have, you could consider:-

Learning to script AutoHotKey - https://www.autohotkey.com/ - which is
excellent for automating Windows applications.

Or (big stretch) have a look at PieCash - the securities table is called
"commodities" -
https://github.com/sdementen/piecash/blob/master/piecash/core/commodity.py
- but direct database manipulation may void your GnuCash warranty.

I reckon you will probably find it quicker to type them in yourself -
you can import price data from CSV once the securities themselves are
set up.

Hope this helps.

Regards

Geoff
=



On 20/10/2021 7:25 pm, Public Address wrote:
> Thank you all.  Someone last night pointed me to the trace file.  I
> tried to save as sqlite3, failed then closed down.  The last lines are
> as follows:
>
> * 17:59:21 ERROR  gboolean qof_book_is_readonly(const
> QofBook*): assertion 'book != NULL' failed
> * 17:59:26 ERROR  [error_handler()] DBI error: 19: NOT
> NULL constraint failed: splits.memo
> * 17:59:26 ERROR 
> [GncDbiSqlConnection::execute_nonselect_statement()] Error executing SQL
> INSERT INTO
> splits(guid,tx_guid,account_guid,memo,action,reconcile_state,reconcile_date,value_num,value_denom,quantity_num,quantity_denom)
> VALUES('[xxx]','[xxy]','[xxz]',NULL,'','c','2021-01-24
> 17:57:12',46353,100,46353,100)
> * 17:59:26 ERROR 
> [GncSqlBackend::execute_nonselect_statement()] SQL error: INSERT INTO
> splits(guid,tx_guid,account_guid,memo,action,reconcile_state,reconcile_date,value_num,value_denom,quantity_num,quantity_denom)
> VALUES('[xxx]','[xxy]','[xxz]',NULL,'','c','2021-01-24
> 17:57:12',46353,100,46353,100)
>
> I am not sure how to look for transactions via the guid_tx, but I
> searched for 463.53.  I was then shown a split transaction view of a
> transaction that was put into the imbalance account.  The description
> was “NULL” where the rectangle is in the attached.  Some of my other
> imbalance entries had this entry, some did not.  So I removed them all
> and now it writes.
>
> I don't believe I put these “NULL”s in, I think gnucash did it so might
> be something to look into.
>
> Not sure if you saw my other question – can import securities (not the
> security transactions) or can I only add them via the GUI?
>
> Many Thanks
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
>
> *From: *Geoff <mailto:cleanoutmys...@gmail.com>
> *Sent: *20 October 2021 04:29
> *To: *David Carlson <mailto:david.carlson@gmail.com>
> *Cc: *Public Address <mailto:public.addr...@hotmail.co.uk>;
> gnucash-user@gnucash.org <mailto:gnucash-user@gnucash.org>
> *Subject: *Re: [GNC] save as sqlite3 error
>
> Good pickup David - Thunderbird dropped the attachment, but I can see it
> via Gmail  {:--(
>
> Not that it helps much PA, as John said, please check the trace file.
>
> Geoff
> =
>
> On 20/10/2021 2:04 pm, David Carlson wrote:
>  > It is odd that PA's screenshot made it to my Gmail account in Windows OS
>  > when it did not get to Geoff's email client, or maybe it did but Geoff
>  > did not see it because for some reason there was an inline link as well
>  > as an attachment at the end.  In either case I cannot comment on the
>  > sqlite issue as I have no experience with that.  Did I see an email
>  > elsewhere suggesting that sometimes an incorrect version of some library
>  > program was incorrectly selected by the installation program?
>  >
>  > On Tue, Oct 19, 2021 at 8:16 PM Geoff   > <mailto:cleanoutmys...@gmail.com <mailto:cleanoutmys...@gmail.com>>>
> wrote:
>  >
>  > Hi PA
>  >
>  > I can't help you with this error except to say that I am running
> on the
>  > same build on Windows 10 and cannot reproduce your problem.  BUT I do
>  > not have Trading Accounts switched on.
>  >
>  > I successful

Re: [GNC] save as sqlite3 error

2021-10-22 Thread Public Address
Thank you all.  Someone last night pointed me to the trace file.  I tried to 
save as sqlite3, failed then closed down.  The last lines are as follows:

* 17:59:21 ERROR  gboolean qof_book_is_readonly(const QofBook*): 
assertion 'book != NULL' failed
* 17:59:26 ERROR  [error_handler()] DBI error: 19: NOT NULL 
constraint failed: splits.memo
* 17:59:26 ERROR  
[GncDbiSqlConnection::execute_nonselect_statement()] Error executing SQL INSERT 
INTO 
splits(guid,tx_guid,account_guid,memo,action,reconcile_state,reconcile_date,value_num,value_denom,quantity_num,quantity_denom)
 VALUES('[xxx]','[xxy]','[xxz]',NULL,'','c','2021-01-24 
17:57:12',46353,100,46353,100)
* 17:59:26 ERROR  
[GncSqlBackend::execute_nonselect_statement()] SQL error: INSERT INTO 
splits(guid,tx_guid,account_guid,memo,action,reconcile_state,reconcile_date,value_num,value_denom,quantity_num,quantity_denom)
 VALUES('[xxx]','[xxy]','[xxz]',NULL,'','c','2021-01-24 
17:57:12',46353,100,46353,100)

I am not sure how to look for transactions via the guid_tx, but I searched for 
463.53.  I was then shown a split transaction view of a transaction that was 
put into the imbalance account.  The description was “NULL” where the rectangle 
is in the attached.  Some of my other imbalance entries had this entry, some 
did not.  So I removed them all and now it writes.

I don't believe I put these “NULL”s in, I think gnucash did it so might be 
something to look into.

Not sure if you saw my other question – can import securities (not the security 
transactions) or can I only add them via the GUI?

Many Thanks




Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows

From: Geoff<mailto:cleanoutmys...@gmail.com>
Sent: 20 October 2021 04:29
To: David Carlson<mailto:david.carlson@gmail.com>
Cc: Public Address<mailto:public.addr...@hotmail.co.uk>; 
gnucash-user@gnucash.org<mailto:gnucash-user@gnucash.org>
Subject: Re: [GNC] save as sqlite3 error

Good pickup David - Thunderbird dropped the attachment, but I can see it
via Gmail  {:--(

Not that it helps much PA, as John said, please check the trace file.

Geoff
=

On 20/10/2021 2:04 pm, David Carlson wrote:
> It is odd that PA's screenshot made it to my Gmail account in Windows OS
> when it did not get to Geoff's email client, or maybe it did but Geoff
> did not see it because for some reason there was an inline link as well
> as an attachment at the end.  In either case I cannot comment on the
> sqlite issue as I have no experience with that.  Did I see an email
> elsewhere suggesting that sometimes an incorrect version of some library
> program was incorrectly selected by the installation program?
>
> On Tue, Oct 19, 2021 at 8:16 PM Geoff  <mailto:cleanoutmys...@gmail.com>> wrote:
>
> Hi PA
>
> I can't help you with this error except to say that I am running on the
> same build on Windows 10 and cannot reproduce your problem.  BUT I do
> not have Trading Accounts switched on.
>
> I successfully saved a 35MB XML file to SQLite and can access that file
> in both GnuCash and the SQLite DB Browser.  See attached screenshot.
>
> (Your screenshot didn't come through - try attaching instead of
> pasting).
>
> Have you tried debugging: https://wiki.gnucash.org/wiki/Logging
> <https://wiki.gnucash.org/wiki/Logging>
>
> Start gnucash.exe from the command line with the "--debug" switch.  In
> my case, the log files are called gnucash.traceXX.log in
> ~\AppData\Local\Temp
>
> Being Windows, perhaps a reboot may help?
>
> Good luck.
>
> Regards
>
> Geoff
> =
>
> On 19/10/2021 6:27 pm, Public Address wrote:
>  > Hi - In xml format
>  >
>  > Trying to save as sqlite3 getting error when file gets to 213kb.
> Plenty of room on disk.  I have tried different drives, different
> filenames no luck.
>  >
>  > [cid:image001.png@01D7C4C2.F1FEDBF0]
>  >
>  >
>  > Many thanks
>  >
>  > Windows 10
>  > GNU  4.8
>  > Build ID 4.8a+ (2021-09-28)
>  > Finance::Quote 1.49
>  >
>  > Trading Accounts: on
>  >
>  > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986
> <https://go.microsoft.com/fwlink/?LinkId=550986>> for Windows
>  >
>  >
>  >
>  > ___
>  > gnucash-user mailing list
>  > gnucash-user@gnucash.org <mailto:gnucash-user@gnucash.org>
>  > To update your subscription preferences or to unsubscribe:
>  > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> <https://lists.gnu

[GNC] save as sqlite3 error

2021-10-19 Thread Public Address
Hi - In xml format

Trying to save as sqlite3 getting error when file gets to 213kb.  Plenty of 
room on disk.  I have tried different drives, different filenames no luck.

[cid:image001.png@01D7C4C2.F1FEDBF0]


Many thanks

Windows 10
GNU  4.8
Build ID 4.8a+ (2021-09-28)
Finance::Quote 1.49

Trading Accounts: on

Sent from Mail for Windows

___
gnucash-user mailing list
gnucash-user@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.


[GNC] Import securities into security editor and show local value of shares not default currency value of shares

2021-10-18 Thread Public Address
Hi


  1.  Is it possible to import securities into the securities editor or does 
every stock have to be manually set up?
  2.  I have GBP set as the main currency.  I have a USD shares in a USD 
denominated account.  Is it possible to show the USD value of the shares?  
Currently it only shows i) number of shares and ii) value in GBP.

Thanks




GNU  4.8
Build ID 4.8a+ (2021-09-28)
Finance::Quote 1.49

Trading Accounts: on



Sent from Mail for Windows

___
gnucash-user mailing list
gnucash-user@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.


Re: [GNC] GNU cash keeps adding trading accounts

2021-06-28 Thread Public Address
OK no problem – does the developer community see the same error I get?
Part of the bug description looks similar.  But this is what I have right now.

[cid:image001.png@01D76B61.848D6E20]

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: D.<mailto:sunfis...@yahoo.com>
Sent: 27 June 2021 12:45
To: David H<mailto:hell...@gmail.com>
Cc: Michael via gnucash-user<mailto:gnucash-user@gnucash.org>; Public 
Address<mailto:public.addr...@hotmail.co.uk>
Subject: Re: [GNC] GNU cash keeps adding trading accounts

My apologies. I was remembering a different thread and bug from the same time 
frame.


 Original Message 
From: "D. via gnucash-user" 
Sent: Sun Jun 27 07:42:45 EDT 2021
To: David H 
Cc: Michael via gnucash-user , Public Address 

Subject: Re: [GNC] GNU cash keeps adding trading accounts

This may or may not be the same problem as in the earlier issue. The earlier 
issue concerned accounts created in Equity erroneously, not Trading. The (mis-) 
creation of trading accounts in different tree structures sounds like a 
different but related problem. Perhaps the fix implemented there will work for 
this as well, but then again, maybe not.



 Original Message 
From: David H 
Sent: Sun Jun 27 03:55:29 EDT 2021
To: Public Address 
Cc: "gnucash-user@gnucash.org" 
Subject: Re: [GNC] GNU cash keeps adding trading accounts

I think this is a known bug discussed/reported back in late April which has
been fixed and will presumably be released in v4.6 shortly.  Check out
https://lists.gnucash.org/pipermail/gnucash-user/2021-April/096343.html for
more details.  Bug report at https://bugs.gnucash.org/show_bug.cgi?id=798093

Cheers David H.

On Sun, 27 Jun 2021 at 17:00, Public Address 
wrote:

> Version: 4.5
> Build ID: 4.5+(2021-03-27)
> Finance::Quote: 1.49
> Windows 10
>
> I have been entering stock transactions.  All stocks are successfully set
> up in the security editor.
>
> However, if (say) I buy AMD shares
>
>
> 1 Buy 10 shares in Brokerage account:AMD
>
> 2 GNU reduces cash in Brokerage account:USD Cash
>
> 3 GNU then automatically creates TRADING:NASDAQ:AMD
>
> 4 Which is fine
>
> 5 Then buy 20 shares of MSFT in Brokerage account:MSFT
>
> 6 GNU reduces cash in Brokerage account:USD Cash
>
> 7 GNU then automatically creates TRADING:NASDAQ:MSFT
> as a totally separate tree ie not under TRADING:NASDAQ created in 3
>
> So for every ticker GNU is creating a separate tree.
>
> I get that I can move the MSFT under NASDQ to sit with AMD but why is GNU
> creating a totally separate tree each time?
>
> Thanks
>
> ___
> gnucash-user mailing list
> gnucash-user@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.
>
___
gnucash-user mailing list
gnucash-user@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.

___
gnucash-user mailing list
gnucash-user@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.

___
gnucash-user mailing list
gnucash-user@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.


Re: [GNC] GNU cash keeps adding trading accounts

2021-06-28 Thread Public Address
Thanks David, I look forward to the update as I have about 10 separate trading 
trees now!

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: David H<mailto:hell...@gmail.com>
Sent: 27 June 2021 08:55
To: Public Address<mailto:public.addr...@hotmail.co.uk>
Cc: gnucash-user@gnucash.org<mailto:gnucash-user@gnucash.org>
Subject: Re: [GNC] GNU cash keeps adding trading accounts

I think this is a known bug discussed/reported back in late April which has 
been fixed and will presumably be released in v4.6 shortly.  Check out 
https://lists.gnucash.org/pipermail/gnucash-user/2021-April/096343.html for 
more details.  Bug report at https://bugs.gnucash.org/show_bug.cgi?id=798093

Cheers David H.

On Sun, 27 Jun 2021 at 17:00, Public Address 
mailto:public.addr...@hotmail.co.uk>> wrote:
Version: 4.5
Build ID: 4.5+(2021-03-27)
Finance::Quote: 1.49
Windows 10

I have been entering stock transactions.  All stocks are successfully set up in 
the security editor.

However, if (say) I buy AMD shares


1 Buy 10 shares in Brokerage account:AMD

2 GNU reduces cash in Brokerage account:USD Cash

3 GNU then automatically creates TRADING:NASDAQ:AMD

4 Which is fine

5 Then buy 20 shares of MSFT in Brokerage account:MSFT

6 GNU reduces cash in Brokerage account:USD Cash

7 GNU then automatically creates TRADING:NASDAQ:MSFT as a 
totally separate tree ie not under TRADING:NASDAQ created in 3

So for every ticker GNU is creating a separate tree.

I get that I can move the MSFT under NASDQ to sit with AMD but why is GNU 
creating a totally separate tree each time?

Thanks

___
gnucash-user mailing list
gnucash-user@gnucash.org<mailto:gnucash-user@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.

___
gnucash-user mailing list
gnucash-user@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.


[GNC] GNU cash keeps adding trading accounts

2021-06-27 Thread Public Address
Version: 4.5
Build ID: 4.5+(2021-03-27)
Finance::Quote: 1.49
Windows 10

I have been entering stock transactions.  All stocks are successfully set up in 
the security editor.

However, if (say) I buy AMD shares


1 Buy 10 shares in Brokerage account:AMD

2 GNU reduces cash in Brokerage account:USD Cash

3 GNU then automatically creates TRADING:NASDAQ:AMD

4 Which is fine

5 Then buy 20 shares of MSFT in Brokerage account:MSFT

6 GNU reduces cash in Brokerage account:USD Cash

7 GNU then automatically creates TRADING:NASDAQ:MSFT as a 
totally separate tree ie not under TRADING:NASDAQ created in 3

So for every ticker GNU is creating a separate tree.

I get that I can move the MSFT under NASDQ to sit with AMD but why is GNU 
creating a totally separate tree each time?

Thanks

___
gnucash-user mailing list
gnucash-user@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.


Re: [GNC] foreign currency bank account import

2021-02-22 Thread Public Address
Sorry
Version:   4.4
Build ID: 4.4+ (2020-12-28)
Finance::Quote: 1.49
OS: windows 10

From: David Carlson<mailto:david.carlson@gmail.com>
Sent: 12 February 2021 01:55
To: Public Address<mailto:public.addr...@hotmail.co.uk>
Cc: gnucash-user@gnucash.org<mailto:gnucash-user@gnucash.org>
Subject: Re: [GNC] foreign currency bank account import

There have been issues in the past with certain releases of GnuCash.  If you 
tell us which version of GnuCash you are using and your operating system you 
will get a better answer.

On Thu, Feb 11, 2021 at 7:36 PM Public Address 
mailto:public.addr...@hotmail.co.uk>> wrote:
Hi -

I import a USD bank csv file where GBP is my base currency

All transactions are properly linked to a transfer account, some of these are 
USD some are GBP.

GNU Cash makes the transactions which are linked to a GBP transfer account a 
split transaction and tries to link to [consistently the same two] transfer 
accounts which I had not specified. I think it is attempting to do the FX 
conversion but it gets it the wrong way round. It also does not allow me to 
override and specify a [correct] non-USD transfer account.

If I manually enter a transaction as per my import file, it does not split the 
account and immediately asks me for the FX rate and I can get that and it 
converts it normally.

Is this a known issue with trying to import foreign currency bank accounts?

Thanks




___
gnucash-user mailing list
gnucash-user@gnucash.org<mailto:gnucash-user@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.


--
David Carlson

___
gnucash-user mailing list
gnucash-user@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.


[GNC] foreign currency bank account import

2021-02-11 Thread Public Address
Hi -

I import a USD bank csv file where GBP is my base currency

All transactions are properly linked to a transfer account, some of these are 
USD some are GBP.

GNU Cash makes the transactions which are linked to a GBP transfer account a 
split transaction and tries to link to [consistently the same two] transfer 
accounts which I had not specified. I think it is attempting to do the FX 
conversion but it gets it the wrong way round. It also does not allow me to 
override and specify a [correct] non-USD transfer account.

If I manually enter a transaction as per my import file, it does not split the 
account and immediately asks me for the FX rate and I can get that and it 
converts it normally.

Is this a known issue with trying to import foreign currency bank accounts?

Thanks




___
gnucash-user mailing list
gnucash-user@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.