setting up zero-sum plugin to work

79 views
Skip to first unread message

jrgo...@gmail.com

unread,
May 5, 2021, 1:57:24 AM5/5/21
to Beancount
I really like the zerosum solution that Redstreet created for handling transfers and also how this can help with automation and it solves other issues. This solves the exact issue I was starting to face as I was getting setup. I'm trying to get the plugins to work but I'm getting an error message (perhaps it's something really simple ). 

1) I installed the plugins via pip successfully

(base) MacBook-Air:beandata jonathan$ pip show beancount-reds-plugins
Name: beancount-reds-plugins
Version: 0.1.0
Summary: A collection of plugins for Beancount
Home-page: https://github.com/redstreet/beancount_reds_plugins
Author: Red Street
License: GPL-3.0
Location: /Users/jonathan/opt/miniconda3/lib/python3.8/site-packages
Requires: beancount
Required-by:

2) when I try the sample file I get an error. Is there something I need to do elsewhere to get this to work? I thought I can use the existing bean-check code and just run it on the sample file. 

(2b) (base) MacBook-Air:beandata jonathan$ bean-check --version
Beancount 2.3.4 (git:5adf7b9a; 2021-03-20)

bean-check /Users/jonathan/opt/miniconda3/lib/python3.8/site-packages/beancount_reds_plugins/zerosum/zs_test.beancount 
<load>:0:       Error importing "plugins.beancount_plugins_redstreet.zerosum.zerosum": Traceback (most recent call last):
    File "/Users/jonathan/opt/miniconda3/lib/python3.8/site-packages/beancount/loader.py", line 573, in run_transformations
      module = importlib.import_module(plugin_name)
    File "/Users/jonathan/opt/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
    File "<frozen importlib._bootstrap>", line 991, in _find_and_load
    File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
    File "<frozen importlib._bootstrap>", line 991, in _find_and_load
    File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
    File "<frozen importlib._bootstrap>", line 991, in _find_and_load
    File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
    File "<frozen importlib._bootstrap>", line 991, in _find_and_load
    File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
  ModuleNotFoundError: No module named 'plugins'
 

redst...@gmail.com

unread,
May 5, 2021, 4:12:46 AM5/5/21
to Beancount
Removing the "plugins." part of the import string should make it work.

This was already fixed in 5a1474c a while ago, but it's been a while since I made a pip release. Just made one.

Jonathan Goldman

unread,
May 5, 2021, 7:07:33 AM5/5/21
to bean...@googlegroups.com
Thank you. The updated pip release works great. Thanks for creating this plugin. Really great contribution!

--
You received this message because you are subscribed to a topic in the Google Groups "Beancount" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beancount/i3FfRlTJAPg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/c1f96da5-685c-4c6d-8d72-013197092353n%40googlegroups.com.

redst...@gmail.com

unread,
May 6, 2021, 6:21:51 PM5/6/21
to Beancount
Great -- and glad you find it helpful. v3 will have this functionality mostly built-in.
Reply all
Reply to author
Forward
0 new messages