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.

Issue with AccountStats db initialization

See original GitHub issue

Hello, I may be wrong about this, but it would appear that when the sqlite database is empty, AccountStats can’t update correctly. I believe the issue is in AccountStats.py in the line 56:

if (self.get_db_version() == 0) and (self.get_first_timestamp() is not None):

If i’m not correct, the db_version is set to 0 when there’s nothing in the database, but self.get_first_timestamp() will always return None if there is nothing in the database. I think this means that this if statement is never executed.

If this isn’t correct, is there a standard way to initialize the database that I missed?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Evanitocommented, Jun 2, 2017

We should add a catch for this, or at least add a message explaining this could be the case.

0reactions
rnevetcommented, Jun 2, 2017

yeah… that makes sense now. 😃 Then you’ll stop getting those errors ones one loan will be finished. Could improve on that maybe… there is no logic problem here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Database initialization may fail by using automatic seeding in ...
When you try to initialize multiple databases in a SQL Server Always On availability group (AG) by using automatic seeding, you notice that...
Read more >
"Unable to initialize database" error when creating a new SQL ...
Problem. This technote explains why you can get an error when you are trying to create a new production database in Microsoft® SQL...
Read more >
IceWarp-V10.3.2-fiche-version.txt
Dial plan problem fixed, if incoming rules are blank the To: header is used ... 2011-03-25 API - CreateTables,DropTables actions re-initialize DB setings ......
Read more >
ESS_IPSUB through HL_MGR - Cisco Content Hub
Allocation of memory resource demanded by ESS IPSUB FSOL throttle failed. This is a serious problem at the ESS IPSUB FSOL initialization for...
Read more >
SoftLayer API Python Client Documentation - Read the Docs
The following section assumes you have a initialized client ... force – (optional) Force topic to be deleted even if there are attached ......
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