Hello all, I spent almost half of the day yesterday but could not get it to 
work.   I wanted to convert my year old gnucash files to ledger and this is 
what happened so far. 

Firs I tried  ledger 2.x approach  since 3.x can not do the conversion.  I 
 had not much of a problem installing 2.x  but after I issued the command " 
ledger -f   myfile.gnucash  print > myfile.txt"  it spitted out 27 lines of 
error with something " invalid date string".  I had a cursory look at my 
account entries but did not find anything wrong. Any suggestions on how  to 
fix that? 

Anyway after failing in the first approach, I tried another. I compiled 
latest gnucash (2.6.16)  from source with dbi conversion enabled. From 
gnucash  I could save as sqlite3 but the files were saved as 
"myfile.gnucash"  not "myfile.sqlite3".  But I don't know whether it will 
have sqlite3 extension in the first place when saved. Anyway, I went ahead 
and ran the python script  "gnucash2ledger.py"     downloaded from 
"https://github.com/MatzeB/pygnucash";  in the following manner:

python2.7  gnucash2ledger.py myfile.gnucash print > test.txt

The error came through is as follows:

Traceback (most recent call last):
  File "gnucash2ledger.py", line 35, in <module>
    data = gnucash.read_file(sys.argv[1])
AttributeError: 'module' object has no attribute 'read_file'


I noticed in the script page that it says that it requires python 2.7 with 
sqlite3 module enabled.  After some search I did the following to enable 
sqlite3:

sudo apt-get install sqlite3 libsqlite3-dev

sudo pip install pysqlite

But no luck so far. Therefore, any help with the first approach (ledger 2.x 
doing the converstion) or the 2nd approach (python conversion) will be 
highly appreciated. 


Rushad
Dhaka, Bangladesh


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to