2016-07-08 GnuCash IRC logs

00:05:43 *** gncbot has joined #gnucash
00:19:37 *** jchonig has quit IRC
00:19:42 *** jchonig has joined #gnucash
00:54:19 *** Mechtilde has joined #gnucash
01:26:44 *** Mechtilde has quit IRC
02:24:31 *** gjanssens has joined #gnucash
02:24:31 *** ChanServ sets mode: +o gjanssens
02:51:40 *** fabior has joined #gnucash
03:05:11 *** fell has joined #gnucash
03:06:28 *** Drixse has joined #gnucash
03:41:58 *** nomeata has joined #gnucash
03:42:49 *** andreipmbcn has joined #gnucash
03:58:33 *** rubdos has joined #gnucash
04:10:26 <andreipmbcn> jrals, I took a cursory glance at the .cpp files in src-backend in a clone of the master repo and couldn't find templated C++ code. I would like to see what the current C++ files in the project look like before I jump in and (re)write my own, to ensure that I follow consistent standards.
04:11:07 <andreipmbcn> Are they in a different repo? Or did I miss the ones that are written in C++11?
04:11:18 <andreipmbcn> *jralls
04:11:26 *** fabior has quit IRC
04:14:08 <andreipmbcn> I ask this partly because I'm not sure whether to write the code in a procedural or object-oriented style, and also not sure about which parts of the code you want to have templates.
04:14:33 <andreipmbcn> I ask this partly because I'm not sure whether to write the code in
04:14:36 <andreipmbcn> n a procedural or object-oriented style, and also not sure about which parts of the code you want to have templates.
04:15:09 <andreipmbcn> (apologies, the first part of my latest post was truncated for some reason, hence the double post)
04:25:03 *** fabior has joined #gnucash
04:39:29 *** Drixse has quit IRC
05:08:37 *** aqua___ has joined #gnucash
05:11:43 *** aqua___ has quit IRC
05:25:28 *** aqua___ has joined #gnucash
05:29:23 *** andreipmbcn has quit IRC
05:29:34 *** andreipmbcn has joined #gnucash
05:47:55 *** gncbot has joined #gnucash
05:48:14 *** warlord has quit IRC
05:48:28 *** warlord has joined #gnucash
06:06:52 *** aqua___ has quit IRC
06:12:55 *** uXuss has quit IRC
06:19:22 *** uXuss has joined #gnucash
06:25:45 *** Jimraehl1 has joined #gnucash
06:27:18 *** Jimraehl1 has quit IRC
06:28:18 *** Jimraehl1 has joined #gnucash
06:29:56 *** Jimraehl1 has joined #gnucash
06:30:10 *** Jimraehl1 has left #gnucash
06:38:08 *** fabior has quit IRC
06:41:07 *** Jimraehl1 has joined #gnucash
06:42:06 *** Jimraehl1 has quit IRC
08:00:06 *** andy has joined #gnucash
08:15:02 *** gnugnu4snusnu has joined #gnucash
08:19:27 <gnugnu4snusnu> Hello, I'm trying to use https://wiki.gnucash.org/wiki/Stocks/get_prices to import historic stock prices into GNU cash. I've managed to run the first script to get the data out in a text file. I'm having trouble getting the second script to import the prices into gnucash. It seems to run OK, I've put a print around pdb.add_price(p_new) and it returns true, so I'm assuming the call is alright. Once the script has run I get a warning "* 13:12:03 WARN <g
08:27:43 <gnugnu4snusnu> I tried another script which also has the same issue. I know its accessing the price database and stock correctly because it brings back the Long name,
08:53:41 *** rubdos has quit IRC
09:03:56 *** rubdos has joined #gnucash
09:19:10 *** fabior has joined #gnucash
09:26:26 *** ChanServ sets mode: +qo warlord warlord
09:26:30 <warlord> @op gncbot
09:26:30 <gncbot> warlord: Error: I need to be opped to op someone.
09:26:36 *** warlord sets mode: +o gncbot
09:27:02 <warlord> gnugnu4snusnu: Are you running it with gnucash already open?
09:27:49 <warlord> andreipmbcn: jralls is nominally in US/PDT. It was 1am PDT when you sent that. It is currently 6:30am PDT. I wouldn't expect an answer for another couple hours.
09:36:52 <gnugnu4snusnu> warlord: I've tried it with it open and closed. I don't get the warning when its closed.
09:37:01 <gnugnu4snusnu> warlord: Either way no data imports.
09:37:53 <warlord> with it open you'll have the same issue as two users of gnucash...
09:38:16 <warlord> That it doesn't work when closed seems... odd. But I've never used those scripts.
09:39:50 <warlord> I presume you updated both scripts to load the correct stock?
09:40:42 <gnugnu4snusnu> Yes, I've updated the first and it outputs the file with the correct stock prices etc
09:40:55 <warlord> What about the second?
09:41:12 <gnugnu4snusnu> The second file I've set the correct currency "GBP" and namesapce "FUND"
09:41:26 <gnugnu4snusnu> Made sure that it opens the correct file to read from
09:41:44 <warlord> Are you sure that that 'stock' actually gets set to *something*?
09:41:46 <gnugnu4snusnu> I tried printing various values to make sure they look OK
09:42:24 <gnugnu4snusnu> Sorry which stock warlord?
09:42:32 <warlord> stock = commod_table.lookup('NASDAQ', 'INTC')
09:42:32 <gnugnu4snusnu> I'm trying to import fund data
09:42:44 <warlord> That stock. The variable
09:42:53 <warlord> Are you sure it's non-null..
09:43:19 <gnugnu4snusnu> stock = commod_table.lookup('FUND', 'GB00B4PQW151.L')
09:44:07 <warlord> And does the lookup actually return an object?
09:46:01 <warlord> I suppose a better question is: what output DO you get from the second script?
09:46:25 <warlord> (please use pastebin instead of cut-and-paste here if the output is more than 2-3 lines)
09:47:16 <gnugnu4snusnu> I think so because "pl = pdb.get_prices(stock,cur)" gets the object pl and the next line tries to get the first in the collection and it succeeds.
09:47:19 <gnugnu4snusnu> Sure 1 min
09:47:56 <gnugnu4snusnu> http://pastebin.com/FeKvRUKr
09:49:21 <gnugnu4snusnu> If I set the lookup string to something that doesn't exist I get a list index out of range error.
09:50:11 <warlord> That last line is odd...
09:50:24 <warlord> The warning...
09:51:02 <warlord> It implies it didn't hold a LOCK file.. But that should have happened when you opened the file.
09:51:26 <warlord> What's the datestamp on /home/ahmed/Documents/Personal/Finance/ahmed.gnucash ?
09:51:52 <gnugnu4snusnu> Jul 8 14:47
09:52:04 *** minot has joined #gnucash
09:52:11 <gnugnu4snusnu> I ran the import again and its now Jul 8 14:51
09:52:17 <gnugnu4snusnu> So its definitely touching the file.
09:52:24 <warlord> Is the file size increasing, too?
09:52:45 <warlord> The fact that it's touching the file implies that it IS writing it out...
09:53:44 <gnugnu4snusnu> No the file size isn't increasing
09:55:24 <warlord> Oh, well it IS removng all existing prices... So that's not surprising.
09:55:40 <warlord> How do you know it's not working?
09:56:05 <gnugnu4snusnu> The existing prices remain in place
09:56:12 <gnugnu4snusnu> Nothing really changes on the prices screen
09:56:47 <warlord> Just to make sure: you exit gnucash, run this script, restart gnucash, go the prices screen, and nothing has changed?
09:57:59 *** nomeata has quit IRC
09:58:01 <gnugnu4snusnu> Thats right. I just tried again.
09:58:21 <warlord> Okay, what if you do zcat /home/ahmed/Documents/Personal/Finance/ahmed.gnucash | more
09:58:31 <warlord> then search for gnc:pricedb
09:58:45 <warlord> then search for GB00B4PQW151.L
09:59:37 <gnugnu4snusnu> There are only a few instances
09:59:47 <gnugnu4snusnu> Not enough to suggest the data has been imported
10:03:09 <mikee> arlord: Session(url, True, False, False) doesn't create a LCK file as ignore_lock=True
10:03:34 <warlord> mikee: okay. So any idea why this is failing for gnugnu4snusnu ???
10:03:37 <mikee> hence the warning about unlinking the LCK file.
10:04:12 <warlord> mikee: yes, that would indeed cause that.
10:04:48 <warlord> it's clearly opening the file... and added to the in-memory file.. and touching the file on disk.. but... no new entries?
10:04:58 <mikee> This script should't ignore the lockfile
10:05:19 <mikee> no idea about the failure to update.
10:08:34 <warlord> :(
10:10:10 <warlord> sorry gnugnu4snusnu ...
10:10:23 <warlord> mikee: does the python need begin/commit edit calls?
10:14:28 <mikee> arlord: Not sure. I'll look into some of my past scripts. I don't recall needing them though.
10:15:30 <gnugnu4snusnu> I found another script on my travels on the internet and it looks similar, that has the same issue. Reads data from a file fine, put it into objects and tries to add the price database. Looks like it succeeds but fails.
10:16:11 <gnugnu4snusnu> print(pdb.add_price(p_new)) returns True after every call :/
10:24:54 <mikee> Using the sample data on the wiki page I just get : list index out of range at line 52
10:25:34 <mikee> The perl script doesn;t run for me: Can't locate Finance/QuoteHist.pm
10:25:57 <mikee> I'm not a perl programmer.
10:28:39 <gnugnu4snusnu> To install QuoteHist I had to run sudo cpan -i Finance::QuoteHist
10:29:24 <gnugnu4snusnu> Are you running the first or second script? I had to slightly modify the first to get it working for my fund
10:31:13 <warlord> mikee: do you already have a NASDAQ/INTC price entry in your DB? The script requires you to already have one entry.
10:31:55 <mikee> Ah no. Also just installing Finance::QuoteHist from cpan
10:33:25 <mikee> I've never looks at the stocks trading aspects. Never had enough money :)
10:36:23 <gnugnu4snusnu> Haha, just stick a tiny bit in and see it grow.
10:37:31 <mikee> 20 enough ?
10:41:59 <gnugnu4snusnu> I think 1 is enough
10:43:27 <mikee> I'll have to read the concepts guide.
10:46:57 <gnugnu4snusnu> Only just started using gnucash, would be ideal if I could figure out whats wrong with this price import thing
10:49:18 <gnugnu4snusnu> If only it gave me an error message. Any ideas how I can see any errors?
10:50:00 <warlord> gnugnu4snusnu: what error message?
10:53:32 <gnugnu4snusnu> There isn't an error message. I'm not sure how to investigate, my usual approach is google the error message.
10:56:15 <mikee> I always add "--logto stdout" to the command line (Linux) to see warnings etc. Not sure it would help in this case though.
10:58:10 <gnugnu4snusnu> Is that a bit for gnucash binary
10:58:26 <gnugnu4snusnu> Ya I think that won't work with the python bindings
10:58:59 *** warlord has quit IRC
11:02:22 <mikee> OK got it working. IMport runs fine and on re-opening Gnucash I see lots of historic entries in the Price editor.
11:03:10 <mikee> nugnu4snusnu: Correct, not for python. You'd need to add some debuggin to the script.
11:03:55 <mikee> I followed the instructions here : https://wiki.gnucash.org/wiki/Stocks/add_stock
11:05:16 <gnugnu4snusnu> mikee could you try with FUND/GB00B4PQW151.L please?
11:11:57 <mikee> gnugnu4snusnu: Done, works fine. Lots of historic entries in the Price editor.
11:12:43 <gnugnu4snusnu> Ah man, what am I doing wrong :/ did you edit the script at all?
11:14:49 <mikee> ttp://pastebin.com/VTBee1D7
11:15:00 <mikee> http://pastebin.com/VTBee1D7
11:16:43 <mikee> Pub's been open for ages and it's Friday. I'm well into overtime. :)
11:17:07 <gnugnu4snusnu> haha I'm going to the pub in 45 minutes :)
11:17:10 <gnugnu4snusnu> Thanks for your help mikee
11:17:29 <gnugnu4snusnu> I'll give it a go, wish me luck
11:18:14 <gnugnu4snusnu> Hmm still doesn't import for me :/
11:19:04 <gnugnu4snusnu> I just edited the file to include the full path for my gnucash file
11:19:08 <mikee> In the script i need a sys.path.append() because I'm using the devel build in a non-std directory.
11:19:17 <gnugnu4snusnu> I removed that line from the script
11:19:30 <mikee> Yeah you'd need that
11:19:35 <mikee> K
11:19:47 <gnugnu4snusnu> http://pastebin.com/MJSy4RJG
11:20:55 <mikee> Also change : session = Session(url, False, False, False) It shouldn't ignore the lockfile.
11:21:10 <mikee> I should edit the WIKI I guess.
11:21:31 <mikee> I take beer tokens :)
11:22:41 <gnugnu4snusnu> Still doesn't work :/ how annoying
11:22:56 <gnugnu4snusnu> haha how do I get those to you? I was confused for a second... I googled beer token..
11:24:01 <mikee> Nothing new in Price Editor?
11:24:14 <mikee> Lol
11:24:23 <gnugnu4snusnu> I think its deleted the old ones now.
11:24:33 <gnugnu4snusnu> Theres only one price in the price database against that security
11:27:38 <gnugnu4snusnu> Hmm I think I'll start with a new file. When I try to remove the Display symbol it doesn't save the change.
11:27:46 <gnugnu4snusnu> Maybe my file is corrupted
11:31:46 <mikee> http://pasteboard.co/92SvT8yuL.png
11:33:58 <gnugnu4snusnu> What version are you running?
11:34:06 <gnugnu4snusnu> I'm on 2.6.12
11:37:34 <mikee> devel from GitHub so 2.6.13b (Ish). Pretty sure there's been no recent changes that would matter.
11:42:03 *** warlord has joined #gnucash
11:42:03 *** gncbot sets mode: +o warlord
11:45:16 <mikee> me Still amused about googling "beer tokens" and is off to spend mine.
11:46:11 <gnugnu4snusnu> haha I thought it was some new fangled technology thing
11:46:44 <gnugnu4snusnu> I'm trying to build gnucash-git from the aur, but it doesn't build
11:46:48 <gnugnu4snusnu> Just about beer o clock too
11:47:28 <gnugnu4snusnu> Might call it quits soon, so annoying when things don't work like this
11:47:40 <mikee> Cheers and good luck. I can't think of anything else to suggest.
11:47:57 <mikee> Sometimes a step back and a walk works.
11:48:38 <gnugnu4snusnu> Yeah I think that might be a good idea. I was try to figure it out until 3am this morning
11:48:47 <gnugnu4snusnu> Definitely time for a break haha
11:48:57 <warlord> sorry about that.. my system froze an hour ago...
11:49:01 <gnugnu4snusnu> Thanks very much for your help.
11:49:26 <gnugnu4snusnu> No worries warlord. Mikee managed to get it working on his copy. Its something specific to my system.
11:49:41 <warlord> Ah, good. mikee what did you have to do/change>
11:49:42 <warlord> ?
12:04:30 <gnugnu4snusnu> Tried it on my friends opensuse laptop... it worked fine... must be something to do with my own laptop.
12:05:33 <gnugnu4snusnu> Hmm beer time. I'll be back.
12:06:38 *** gnugnu4snusnu has left #gnucash
12:24:20 <jralls> andreipmbcn: The c++-backend work is still in my feature branch: https://github.com/jralls/gnucash/tree/c%2B%2B-backend
12:43:30 *** aqua___ has joined #gnucash
12:46:42 *** aqua___ has quit IRC
12:49:40 <andreipmbcn> jralls, thanks! I'll have a look at it later today.
13:00:32 *** aqua___ has joined #gnucash
13:00:39 *** fabior has quit IRC
13:15:06 *** fabior has joined #gnucash
14:21:05 *** jchonig has quit IRC
14:21:15 *** jchonig has joined #gnucash
14:47:05 *** minot has quit IRC
14:47:30 *** minot has joined #gnucash
15:17:04 *** fabior has quit IRC
16:17:28 *** Mechtilde has joined #gnucash
16:37:23 *** Mechtilde has quit IRC
16:41:49 *** fabior has joined #gnucash
16:53:58 *** minot has quit IRC
17:13:12 *** gjanssens has quit IRC
17:16:54 *** aqua___ has quit IRC
17:20:57 *** rubdos has quit IRC
17:35:39 <mikee> gnugnu4snusnu: python version?
17:36:24 <mikee> know (s)he's gone
17:40:04 <mikee> warlord: Nothing. Just followed the WiKi instructons. I edited the python script on the WiKi as I thought ignoring the LCK file was bad.
17:40:26 <mikee> For reference.
17:46:02 *** andreipmbcn has quit IRC
17:47:31 *** zeta- has joined #gnucash
17:49:03 *** zeta- has left #gnucash
17:52:53 *** fabior has quit IRC
19:03:09 *** kristofer has left #gnucash
19:18:21 *** andy has quit IRC
19:33:20 *** andy has joined #gnucash
19:41:31 *** mlncn has quit IRC
20:11:20 *** mlncn has joined #gnucash
20:17:40 *** andy has quit IRC
21:40:28 *** fell_ has joined #gnucash
21:42:17 *** fell has quit IRC
21:52:29 *** mlncn has quit IRC
22:16:16 *** PyroPeter_ has joined #gnucash
22:18:14 *** PyroPeter has quit IRC
23:59:42 *** rubdos has joined #gnucash