Earnings.py script doesn't works

I tried to use the earnings.py script from linux ubuntu,but the script just doesn’t works.

said me this error:

Traceback (most recent call last):
File “earnings.py”, line 283, in
for data in con.execute(query):
sqlite3.OperationalError: no such column: disqualified

I’m calling the script like this:
sudo python3 earnings.py /path/to/data 2020-09

¿any help?

Here are some things that might help:

  1. Stop the node first, and then copy the data over to a separate folder.
  2. Make sure that your path to those files are correct
  3. You have the latest storagenode and have recently updated Ubuntu and your packages.

nothings helps.

¿also discovered that I can’t enter in any of the carpets inside my nodes (like storage,orders or lost+found) is it normal? maybe has something to do with this?

finally found the solution

just triying to use an older version of the script,not compatible with my current node build

sorry for the troubling

Yes sometimes there are changes to the node databases that aren’t forward and backward compatible with the earnings script. I try to make sure there is always an update available within a week of release of a new incompatible version. But keep in mind, my nodes are on docker, so I’ll be one of the last to get the update. If you run unto any issues, always make sure you are running the latest version of both the node software and this script.

For the fastest response, post any issues on the original topic, then I get a notification about the issue as well.

It’s been working well for me for several months. Suddenly today it errors out:

$ python Storj_scripts/earningsnew.py /mnt/storj/
Traceback (most recent call last):
File “Storj_scripts/earningsnew.py”, line 255, in
con.execute(‘ATTACH DATABASE ? AS su;’,tSU)
sqlite3.OperationalError: attempt to write a readonly database

Try to use it on copy of databases.
I would suggest also to check your databases: How to fix a "database disk image is malformed" – Storj

And do not use network filesystems to have an access to database files.

1 Like