This is the code that loads plugins:
https://bitbucket.org/blais/beancount/src/de8cf9a6a85c8da674bcf934e80c0a9c416edc83/beancount/loader.py?at=default&fileviewer=file-view-default#loader.py-508

Not only does the module have to be in the path, it also has to be listed
in module.__plugins__:
https://bitbucket.org/blais/beancount/src/de8cf9a6a85c8da674bcf934e80c0a9c416edc83/beancount/plugins/check_commodity.py?at=default&fileviewer=file-view-default#check_commodity.py-15

Since you're creating a new plugin, my guess is that you never successfully
got it to work because you are missing the __plugins__ var.

On Mon, May 15, 2017 at 10:48 AM Ian Soboroff <[email protected]> wrote:

> I'm sorry, I made a mistake.  The plugin line does say "tools.payroll",
> not "payroll".
>
>
> On Monday, May 15, 2017 at 1:18:56 PM UTC-4, Jason Chu wrote:
>
>> The module you just created is tools.payroll.  Given that PYTHONPATH
>> includes the current directory, you have to go into the tools module to
>> reference payroll.
>>
>> On Mon, May 15, 2017 at 10:16 AM Ian Soboroff <[email protected]> wrote:
>>
> Sorry if this is a dumb question. I'm working on a plugin, and for some
>>> reason, beancount isn't looking under the current directory for plugins.  I
>>> have things like so:
>>>
>>> data.beancount
>>> tools/
>>>    __init__.py
>>>    payroll.py
>>>
>>> data.beancount contains the line 'plugin "payroll" ""' up near the top.
>>>
>>> If I run 'bean-check data.beancount', I get the error "Error importing
>>> "payroll": No module named 'payroll'".  If I invoke bean-check with
>>> PYTHONPATH=. preceding it on the command line, it works. But the current
>>> directory is always on the PYTHONPATH, at least, that's what the docs say.
>>> Is beancount doing something overly clever here?
>>>
>>> Ian
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>>
>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>> To post to this group, send email to [email protected].
>>
>>
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/168981c5-320a-4fc0-b1ed-8480331c84b3%40googlegroups.com
>>> <https://groups.google.com/d/msgid/beancount/168981c5-320a-4fc0-b1ed-8480331c84b3%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/f7f42d99-ac1a-4001-9aeb-941815100c9f%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/f7f42d99-ac1a-4001-9aeb-941815100c9f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAFFHUgt3%2BRrfpYhBWdeazqBYEGxQfz0roq8d8dfa6S2XmSXUdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to