jbms / beancount-import

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

local install tornado issue #209

Closed ikwtif closed 1 year ago

ikwtif commented 1 year ago

I was still on an older build and trying the latest version installed locally but I'm getting this error. No issue with just installing from pypi so not sure what's going on. Just want to be able to debug some amazon transactions that get an error.

(env-beancount) D:\Finance\beancount-import-master>python -m amazon
Listening at http://127.0.0.1:8101
ERROR:tornado.application:Uncaught exception GET /app.css (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:8101', method='GET', uri='/app.css', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
  File "D:\Finance\env-beancount\lib\site-packages\tornado\web.py", line 1784, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "D:\Finance\beancount-import-master\beancount_import\webserver.py", line 212, in get
    contents = pkg_resources.resource_string(__name__,
  File "D:\Finance\env-beancount\lib\site-packages\pkg_resources\__init__.py", line 1156, in resource_string
    return get_provider(package_or_requirement).get_resource_string(
  File "D:\Finance\env-beancount\lib\site-packages\pkg_resources\__init__.py", line 1401, in get_resource_string
    return self._get(self._fn(self.module_path, resource_name))
  File "D:\Finance\env-beancount\lib\site-packages\pkg_resources\__init__.py", line 1616, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Finance\\beancount-import-master\\beancount_import\\frontend_dist\\app.css'
ERROR:tornado.access:500 GET /app.css (127.0.0.1) 2.00ms
ERROR:tornado.application:Uncaught exception GET /app.js (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:8101', method='GET', uri='/app.js', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
  File "D:\Finance\env-beancount\lib\site-packages\tornado\web.py", line 1784, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "D:\Finance\beancount-import-master\beancount_import\webserver.py", line 212, in get
    contents = pkg_resources.resource_string(__name__,
  File "D:\Finance\env-beancount\lib\site-packages\pkg_resources\__init__.py", line 1156, in resource_string
    return get_provider(package_or_requirement).get_resource_string(
  File "D:\Finance\env-beancount\lib\site-packages\pkg_resources\__init__.py", line 1401, in get_resource_string
    return self._get(self._fn(self.module_path, resource_name))
  File "D:\Finance\env-beancount\lib\site-packages\pkg_resources\__init__.py", line 1616, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Finance\\beancount-import-master\\beancount_import\\frontend_dist\\app.js'
ERROR:tornado.access:500 GET /app.js (127.0.0.1) 1.00ms
jbms commented 1 year ago

You need to also build the frontend, by running npm run build. If you used an editable install, e.g. pip install -e . , that previously worked but was broken by a pip behavior change that means the frontend build no longer happens --- we need to fix that.

ikwtif commented 1 year ago

I see thanks! I missed that.. Worked!