Code Monkey home page Code Monkey logo

Comments (6)

lestephane avatar lestephane commented on June 12, 2024 1

Looks fine now, I'm able to run the import command more than once without errors.

from hledger-flow.

apauley avatar apauley commented on June 12, 2024

I usually remove all the generated include files first:
$ grep -rl 'Generated by hledger-.*DO NOT EDIT' . | xargs rm

Then I may also want to remove the preprocessed files and the generated journals:
$ find . -type f -path '*2-preprocessed*' -or -type f -path '*3-journal*'|xargs rm

This should be safe if all your files are committed to version control

from hledger-flow.

apauley avatar apauley commented on June 12, 2024

I've issued many hledger-flow import commands yesterday, and it could well be that one of them created include files where it shouldn't have. Now i'm unable to import.

~/Finance/import/personal/somebank$ hledger-flow import --sequential

I'm looking at your current directory in the prompt, and it seems that you've changed to a subdirectory.

hledger-flow assumes the basedir is your current dir, unless you've specified the basedir on the command-line.

So you probably don't need to remove any files, just cd back to the basedir.

I can see this is probably surprising behaviour, we should consider being smarter at detecting the basedir.

It will also help to have an option that can print out with which options hledger-flow is running (issue #11).

from hledger-flow.

apauley avatar apauley commented on June 12, 2024

So just after I wrote the above I tried it out on the example data, and it seems that I'm wrong, it does work when running it in a deeper dir, I have just never tried it before.

I think the issue is related to the year 2011.
Yes, hledger-flow doesn't support 2011, sorry. Not a fan of that year :-)

Specifically, it looks for input files with this find function: find (has (suffix "1-in")).
And this unfortunately also matches an include file instead of only input files: 2011-include.journal

We also won't support 2021, 2001, 1991 and any year ending with a 1.

(inputFiles, diff) <- time $ single . shellToList . onlyFiles $ find (has (suffix "1-in")) $ baseDir opts

from hledger-flow.

lestephane avatar lestephane commented on June 12, 2024

interesting. I did manage to run the command once (after cleaning), but never twice. This explains it.

from hledger-flow.

apauley avatar apauley commented on June 12, 2024

@lestephane Can you test if the latest release solves the 2001 issue?

https://github.com/apauley/hledger-flow/releases/tag/v0.11.1.1-beta

from hledger-flow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.