Git Product home page Git Product logo

Comments (6)

joshuabach avatar joshuabach commented on July 17, 2024

Hey 79vette!

Can you set LOG_LEVEL = logging.DEBUG and post the full output of gnucash-web from start to the error?

Which version of GnucashWeb are you using? The latest release or the main branch?

from gnucash-web.

phil2sat avatar phil2sat commented on July 17, 2024

Same here:

`flask run --host=0.0.0.0
'FLASK_ENV' is deprecated and will not be used in Flask 2.3. Use 'FLASK_DEBUG' instead.
'FLASK_ENV' is deprecated and will not be used in Flask 2.3. Use 'FLASK_DEBUG' instead.
'FLASK_ENV' is deprecated and will not be used in Flask 2.3. Use 'FLASK_DEBUG' instead.

  • Serving Flask app 'gnucash_web'
  • Debug mode: on
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:5000
  • Running on http://192.168.1.184:5000
    Press CTRL+C to quit
  • Restarting with stat
    'FLASK_ENV' is deprecated and will not be used in Flask 2.3. Use 'FLASK_DEBUG' instead.
    'FLASK_ENV' is deprecated and will not be used in Flask 2.3. Use 'FLASK_DEBUG' instead.
    'FLASK_ENV' is deprecated and will not be used in Flask 2.3. Use 'FLASK_DEBUG' instead.
  • Debugger is active!
  • Debugger PIN: 989-854-739
    192.168.1.100 - - [12/Sep/2023 14:48:53] "GET /book/accounts/ HTTP/1.1" 500 -
    Traceback (most recent call last):
    File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 2552, in call
    return self.wsgi_app(environ, start_response)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 2532, in wsgi_app
    response = self.handle_exception(e)
    ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
    ^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/dist-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/dist-packages/gnucash_web/auth.py", line 62, in inner
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/dist-packages/gnucash_web/book.py", line 79, in show_account
    with open_book(
    File "/usr/lib/python3.11/contextlib.py", line 137, in enter
    return next(self.gen)
    ^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/dist-packages/gnucash_web/utils/gnucash.py", line 73, in open_book
    raise e
    File "/usr/local/lib/python3.11/dist-packages/gnucash_web/utils/gnucash.py", line 66, in open_book
    with piecash.open_book(*args, **kwargs) as book:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/dist-packages/piecash/core/session.py", line 409, in open_book
    raise GnucashException(
    piecash._common.GnucashException: Database 'sqlite:///db/gnucash.sqlite' does not exist (please use create_book to create GnuCash books from scratch). If you want to bypass this existence check, use the argument check_exists=False.
    192.168.1.100 - - [12/Sep/2023 14:48:53] "GET /book/accounts/?debugger=yes&cmd=resource&f=style.css HTTP/1.1" 304 -
    192.168.1.100 - - [12/Sep/2023 14:48:53] "GET /book/accounts/?debugger=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 -
    192.168.1.100 - - [12/Sep/2023 14:48:53] "GET /book/accounts/?debugger=yes&cmd=resource&f=console.png HTTP/1.1" 304 -
    192.168.1.100 - - [12/Sep/2023 14:48:53] "GET /book/accounts/?debugger=yes&cmd=resource&f=console.png HTTP/1.1" 304 -

/etc/gnucash_web/config.py
import logging

SECRET_KEY = 'FmRAlsBSSqofw/HO/4XaZ639jgW9JDk30dR+85ipv5zs9mVjDWaV36ZM9AKskyfI'

LOG_LEVEL = logging.DEBUG

DB_DRIVER = 'mysql'

DB_HOST = '192.168.1.6'

DB_NAME = 'GnuCash'

AUTH_MECHANISM = None

TRANSACTION_PAGE_LENGTH = 25
`

I neither use sqlite driver, cause i have a mariadb

from gnucash-web.

phil2sat avatar phil2sat commented on July 17, 2024

So found the issue.

its not reading:
/etc/gnucash_web/config.py
or $home/.config/gnucash_web/config.py

Maybe its no longer called so, then please update the install instructions

replaced the /usr/local/lib/python3.11/dist-packages/gnucash_web/config/default.py, error gone

from gnucash-web.

joshuabach avatar joshuabach commented on July 17, 2024

Yes this is exactly the issue, but it should read those files. So this is likely a bug, but I'm not sure right now why this is happening. Will have to look into it more closely.

This also means that it doesn't even read the LOG_LEVEL = logging.DEBUG ...

from gnucash-web.

stevemarkham81 avatar stevemarkham81 commented on July 17, 2024

I had this same issue, and fixed it with the environment variable:

export GNUCASH_WEB_CONFIG=~/.config/gnucash_web/config.py

from gnucash-web.

joshuabach avatar joshuabach commented on July 17, 2024

The issue is that the files read by the app are

{~/.config,/etc}/gnucash-web/config.py

and not

{~/.config,/etc}/gnucash_web/config.py

as it says in the README (underscore vs. dash).

So this is a documentation bug. Fill fix.

from gnucash-web.

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.