Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTERNAL SERVER ERROR #1953

Open
cftjim0130 opened this issue Feb 1, 2025 · 0 comments
Open

INTERNAL SERVER ERROR #1953

cftjim0130 opened this issue Feb 1, 2025 · 0 comments

Comments

@cftjim0130
Copy link

Hi everyone.
I am trying to use beancount. After creating the file, when I click on Holdings, INTERNAL SERVER ERROR appears.
My environment is as follows:
Python 3.9.6
beancount 3.1.0
fava 1.30

test.bean:

option "operating_currency" "USD"
1970-01-01 open Assets:BANK
2014-01-01 open Equity:Opening-Balances

2014-01-02 * "Deposit"
Assets:BANK 100.00 USD
Equity:Opening-Balances

Image

Exception on /beancount/api/query [GET]
Traceback (most recent call last):
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/flask/app.py", line 1511, in wsgi_app
response = self.full_dispatch_request()
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/flask/app.py", line 919, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/flask/app.py", line 917, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/flask/app.py", line 902, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/fava/json_api.py", line 259, in _wrapper
res = func(*validator(data))
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/fava/json_api.py", line 286, in get_query
return g.ledger.query_shell.execute_query_serialised(
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/fava/core/query_shell.py", line 185, in execute_query_serialised
res = self.shell.run(entries, query)
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/fava/core/query_shell.py", line 94, in run
self.context = connect(
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/beanquery/init.py", line 26, in connect
return Connection(dsn, **kwargs)
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/beanquery/init.py", line 35, in init
self.attach(dsn, **kwargs)
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/beanquery/init.py", line 39, in attach
source = importlib.import_module(f'beanquery.sources.{scheme}')
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/beanquery/sources/beancount.py", line 91, in
class Transaction(types.Structure):
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/beanquery/sources/beancount.py", line 93, in Transaction
columns = _typed_namedtuple_to_columns(data.Transaction)
File "/Users/name/MySoft/beancount/lib/python3.9/site-packages/beanquery/sources/beancount.py", line 54, in _typed_namedtuple_to_columns
for name, dtype in typing.get_type_hints(cls).items():
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py", line 1424, in get_type_hints
value = _eval_type(value, base_globals, localns)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py", line 290, in _eval_type
return t._evaluate(globalns, localns, recursive_guard)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py", line 546, in _evaluate
eval(self.forward_code, globalns, localns),
File "", line 1, in
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant