question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Database error: "no such table: accounts"

See original GitHub issue

Hi!

I made a docker image of LNbits (repo here) to use it with docker-compose.

My docker-compose service looks like that:

        lnbits:
                container_name: lnbits
                image: louneskmt/lnbits:latest
                logging: *default-logging
                depends_on: [ lnd ]
                restart: on-failure
                ports:
                    - "5000:5000"
                environment:
                    LNBITS_BACKEND_WALLET_CLASS: LndWallet
                    LND_GRPC_ENDPOINT: 10.11.1.2
                    LND_GRPC_PORT: 10009
                    LND_GRPC_CERT: "/lnd/tls.cert"
                    LND_GRPC_MACAROON: "/lnd/data/chain/bitcoin/mainnet/admin.macaroon"
                volumes:
                    - ${PWD}/lnd:/lnd:ro
                    - ${PWD}/apps/lnbits/.env:/lnbits/.env
                    - ${PWD}/apps/lnbits:/data
                networks:
                    net:
                        ipv4_address: 10.11.9.0

And in my .env file I’ve LNBITS_DATA_FOLDER="/data".

But when I try to add a wallet, this error appears:

...
lnbits               | sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: accounts
lnbits               | [SQL: INSERT INTO accounts (id) VALUES (?)]
lnbits               | [parameters: ('05a7aa654a1f45e488b7deebf69bf2b8',)]
lnbits               | (Background on this error at: http://sqlalche.me/e/13/e3q8)

(But the file database.sqlite3 has been created in my directory apps/lnbits.

It was working well before the env variable LNBITS_DATA_FOLDER was set to /data (but there was no persistence).

Any ideas on how I can solve this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
louneskmtcommented, Feb 14, 2021

I’m assuming with your LNbits Umbrel win, you managed to get around this?

Yeah, but I don’t really remember how haha

Here is the Docker image source: https://github.com/louneskmt/docker-lnbits

0reactions
arcbtccommented, Feb 14, 2021

I’m assuming with your LNbits Umbrel win, you managed to get around this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No Such Table error - sqlite - Stack Overflow
SQLite silently creates the database file if it does not exist. So if you've got the path wrong, you are opening an empty...
Read more >
First start creates an empty database with no tables · Issue #473
failed to fetch accounts: SQL logic error: no such table: account (1) (500). It works only if before the first start run:.
Read more >
'No such table' returned while the database contains it - SQLite
It seems the connection refers to an empty database, but I can see content when browsing the database after the application crashed.
Read more >
DatabaseError: Execution failed on sql : no such table: League
Hi everyone,. I am trying to connect to the sqllite3 database. But it says DatabaseError: Execution failed on sql 'SELECT * FROM League':...
Read more >
runtime error: no such table: students : r/cs50 - Reddit
I'm able to print all the information presented in characters.csv. The first, middle if available, and last names of the students all print ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found