jbms / beancount-import

Web UI for semi-automatically importing external data into beancount
GNU General Public License v2.0
391 stars 100 forks source link

Can't run examples on PyPI version #97

Closed vkurup closed 2 years ago

vkurup commented 3 years ago

Hello, thank you for writing and maintaining this software! Just wanted to note that I was unable to run the examples using the version available on PyPI with this error:

(my-finances) $ ./run.py 
Listening at http://127.0.0.1:8101
Traceback (most recent call last):
  File "/home/vkurup/.pyenv/versions/3.9.0/envs/my-finances/lib/python3.9/site-packages/beancount_import/webserver.py", line 493, in _handle_reconciler_loaded
    loaded_reconciler = loaded_future.result()
  File "/home/vkurup/.pyenv/versions/3.9.0/lib/python3.9/concurrent/futures/_base.py", line 433, in result
    return self.__get_result()
  File "/home/vkurup/.pyenv/versions/3.9.0/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/home/vkurup/.pyenv/versions/3.9.0/envs/my-finances/lib/python3.9/site-packages/beancount_import/thread_helpers.py", line 13, in wrapper
    f.set_result(fn(*args, **kwargs))
  File "/home/vkurup/.pyenv/versions/3.9.0/envs/my-finances/lib/python3.9/site-packages/beancount_import/reconcile.py", line 380, in __init__
    self._load_sources()
  File "/home/vkurup/.pyenv/versions/3.9.0/envs/my-finances/lib/python3.9/site-packages/beancount_import/reconcile.py", line 433, in _load_sources
    sources = self.sources = [
  File "/home/vkurup/.pyenv/versions/3.9.0/envs/my-finances/lib/python3.9/site-packages/beancount_import/reconcile.py", line 434, in <listcomp>
    load_source(spec, log_status=self.reconciler.log_status)
  File "/home/vkurup/.pyenv/versions/3.9.0/envs/my-finances/lib/python3.9/site-packages/beancount_import/source/__init__.py", line 318, in load_source
    m = importlib.import_module(source_spec.pop('module'))
  File "/home/vkurup/.pyenv/versions/3.9.0/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'beancount_import.source.generic_importer_source'

I was able to successfully get it to work by downloading the master branch:

pip install git+git://github.com/jbms/beancount-import@master#egg=beancount-import

(in case that helps someone else until the current version is released to PyPI)

mcbloch commented 3 years ago

This gives an error for me

> esbuild --bundle app.tsx --sourcemap --minify --outdir=../beancount_import/frontend_dist --define:global=window '--define:process.env.NODE_ENV="production"'

     > node_modules/styled-components/dist/styled-components.browser.esm.js:1:62: error: Could not resolve "react-is" (mark it as external to exclude it from the bundle)
        1 │ ...isValidElementType as n}from"react-is";import r,{useState as o,use...
          ╵                                ~~~~~~~~~~

    1 error
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! beancount-import@0.0.1 build: `esbuild --bundle app.tsx --sourcemap --minify --outdir=../beancount_import/frontend_dist --define:global=window '--define:process.env.NODE_ENV="production"'`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the beancount-import@0.0.1 build script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

The version atm should be 71653c398d0706e5b3ad4272f3d998ae2d21f6ed

ybnd commented 3 years ago

Ran into the same issue, solved it by running with NodeJS v15.14.0 / npm 7.9.0

alexason commented 2 years ago

Ran into the same issue, solved it by running with NodeJS v15.14.0 / npm 7.9.0

This is the answer - documentation should include reference to required NodeJS/npm version required.

Note npm can be updated by:

npm install -g npm

moritzj29 commented 2 years ago

this can be closed I guess, it has been resolved in #118

Zburatorul commented 2 years ago

Probably obsolete in 1.3.4