Giter VIP home page Giter VIP logo

Comments (11)

 avatar commented on September 11, 2024 1

EDIT: Just forget. I installed the module argh and now your example.bc file works.
I left just in case somebody has the same error. The solution is:
pip3 install argh

Regards and thank you for your work!

Tino.

Hi, the same here... I post the output to your last command:

Python 3.7.6 (default, Dec 30 2019, 19:38:26)
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fava_investor.fava_investor
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/tinotuno/fava_investor/fava_investor/__init__.py", line 6, in <module>
    from .modules.assetalloc_class import libassetalloc
  File "/Users/tinotuno/fava_investor/fava_investor/modules/assetalloc_class/libassetalloc.py", line 4, in <module>
    import argparse,argcomplete,argh
ModuleNotFoundError: No module named 'argh'
>>>

from fava_investor.

 avatar commented on September 11, 2024 1

@redstreet you forgot
pip3 install argh
Without that doesn't work. pip3 install argcomplete is not enough.

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

The git repo name unfortunately has a hyphen, which is not valid in python imports. I'll rename the repo. Meanwhile, move your clone:

mv fava-investor fava_investor

Assuming you did this in the same directory of your beancount source, invoke the fava extension using the line below, given the actual module lives in a subdirectory that is also named fava_investor:

# 2010-01-01 custom "fava-extension" "fava_investor.fava_investor" "{...}"

Let me know if that worked for you. I'll add a note to the README.

from fava_investor.

scanta2 avatar scanta2 commented on September 11, 2024

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

Did you try running the example? See CONTRIBUTING.md (I just moved it to README.md).

If that doesn't work, you might want to install the latest released version of fava.

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

"Importing module "fava_investor" failed."

That usually means the module was not found. Try running python3 interactively and typing:
import fava_investor.fava_investor

That should succeed. Does it?

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

Ah okay, that helps! This should fix it:
pip install argh argcomplete

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

Added to README.md

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

@scanta2, please reopen if you're still having trouble.

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

Ah, thanks for catching this. Will add.

from fava_investor.

redstreet avatar redstreet commented on September 11, 2024

If either of you want to contribute the below, that'd be cool:
#25

from fava_investor.

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.