adept / full-fledged-hledger

Tutorial on Hledger setup with multi-year files, multi-source imports and a range of auto-generated reports
https://github.com/adept/full-fledged-hledger/wiki
BSD 3-Clause "New" or "Revised" License
357 stars 31 forks source link

Generating opening accounts throwing an error when other than 2017 #31

Open MarshCastle opened 1 week ago

MarshCastle commented 1 week ago

I realise that I'm probably going to look stupid here, but I've found your excellent learning tool, trying to apply it and coming a cropper on the first steps of creating my set of accounts.

I'm working my way through 01-getting-started, am editing export/export.hs to amend 2017 to 2024 and running the export.sh script to call it - but I'm getting an error:

~/full-fledged-hledger/01-getting-started$ ./export.sh 
Error when running Shake build system:
  at want, called at ~/full-fledged-hledger/01-getting-started/export/export.hs:101:24 in main:Main
* Depends on: 2024-cash-flow.txt
* Raised the exception:
../2024.journal: openFile: does not exist (No such file or directory)

it seems that I should already have accounts, but that isn't stated in the doc. Am I missing something obvious? should I create the 2024-cash-flow.txt file by hand? The doc says that it should be generated, no?

adept commented 1 week ago

It complains that it can't generate 2024-cash-flows.txt because the source file for it -- your journal for 2024 -- does not exist.

You need to create 2024.journal (you can get started by renaming 2017.journal and changing the dates on transactions inside), and then try running export.sh again

On Fri, 6 Sept 2024, 23:27 MarshCastle, @.***> wrote:

I realise that I'm probably going to look stupid here, but I've found your excellent learning tool, trying to apply it and coming a cropper on the first steps of creating my set of accounts.

I'm working my way through 01-getting-started, am editing export/export.hs to amend 2017 to 2024 and running the export.sh script to call it - but I'm getting an error:

~/full-fledged-hledger/01-getting-started$ ./export.sh Error when running Shake build system: at want, called at ~/full-fledged-hledger/01-getting-started/export/export.hs:101:24 in main:Main

  • Depends on: 2024-cash-flow.txt
  • Raised the exception: ../2024.journal: openFile: does not exist (No such file or directory)

it seems that I should already have accounts, but that isn't stated in the doc. Am I missing something obvious? should I create the 2024-cash-flow.txt file by hand? The doc says that it should be generated, no?

— Reply to this email directly, view it on GitHub https://github.com/adept/full-fledged-hledger/issues/31, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA42KWPQNGNIKYS7GGODD3ZVIT5ZAVCNFSM6AAAAABNZMMWGGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYTCMRXGMZDMMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MarshCastle commented 1 week ago

I knew I was being stupid. Thank you. It works perfectly :)