Coder Social home page Coder Social logo

Plugin fails to load about beancounttools HOT 4 CLOSED

tarioch avatar tarioch commented on August 15, 2024
Plugin fails to load

from beancounttools.

Comments (4)

tarioch avatar tarioch commented on August 15, 2024

Interesting, I'm using it only on linux but I don't see how that can make a difference.
I'm also using 3.7.6 but I guess that should also not be the problem. Are you using it from native windows or wsl?
Could you try it out from wsl?

from beancounttools.

stmach avatar stmach commented on August 15, 2024

All right, I've spun up WSL on my machine (Ubuntu 20.04 LTS) using Python v3.8.2 and I still got the same error.

Upon investigating more, I found out that the error is related to having price entries in the file without resolving all of the RHS commodities to the base currency (the argument provided to the plugin). For example:

plugin "tariochbctools.plugins.generate_base_ccy_prices" "BASE"

2020-05-08 price WHATEVER    77 SOMETHING

fails with the error. adding to the file:

2020-05-08 price SOMETHING   12 BASE

makes it go away. So I'm pretty sure a missing price for the base currency is the culprit.

In my case, I had prices for some stocks in USD, but was still missing a price entry for USD -> CHF (which I wanted to fetch in using your exchangeratesapi).


Another thing I see (and probably I should split this into its own issue):
When running bean-price for the first time (or with --no-cache) using exchangeratesapi, the name of the commodity is printed out as well (which will lead to issues if you want to include the resulting output):

$ bean-price --no-cache -e CHF:tariochbctools.plugins.prices.exchangeratesapi/USD
USD
2020-05-08 price USD                                  0.97 CHF

from beancounttools.

stmach avatar stmach commented on August 15, 2024

Addendum:
if there's already a price entry (for the base currency) specified for the current date it also fails.
So it fails if:

  • price entries are present in the file but one going to base currency is not there at all
  • price entry going to base currency for the current date is already in the file

from beancounttools.

tarioch avatar tarioch commented on August 15, 2024

Thank you very much for the detailed tracking of the issues. All of them should be fixed in 0.6.1 that I just released. I now also added some test cases for the scenarios you described.

from beancounttools.

Related Issues (16)

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.