# Earnings.py script doesn't works

**URL:** <https://forum.storj.io/t/earnings-py-script-doesnt-works/9617>\
**Category:** troubleshooting\
**Tags:** payouts\
**Created:** [October 9, 2020, 11:05pm UTC](https://forum.storj.io/t/earnings-py-script-doesnt-works/9617 "2020-10-09T23:05:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![camulodunum](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/camulodunum/32/1140_2.png) [@camulodunum](https://forum.storj.io/u/camulodunum)\
**Post date:** [October 9, 2020, 11:05pm UTC](https://forum.storj.io/t/earnings-py-script-doesnt-works/9617/1 "2020-10-09T23:05:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![articrain](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/articrain/32/1139_2.png) [@articrain](https://forum.storj.io/u/articrain)\
**Post date:** [October 10, 2020, 1:22am UTC](https://forum.storj.io/t/earnings-py-script-doesnt-works/9617/2 "2020-10-10T01:22:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![camulodunum](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/camulodunum/32/1140_2.png) [@camulodunum](https://forum.storj.io/u/camulodunum)\
**Post date:** [October 10, 2020, 1:22pm UTC](https://forum.storj.io/t/earnings-py-script-doesnt-works/9617/3 "2020-10-10T13:22:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![camulodunum](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/camulodunum/32/1140_2.png) [@camulodunum](https://forum.storj.io/u/camulodunum)\
**Post date:** [October 10, 2020, 1:46pm UTC](https://forum.storj.io/t/earnings-py-script-doesnt-works/9617/4 "2020-10-10T13:46:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [October 12, 2020, 9:20am UTC](https://forum.storj.io/t/earnings-py-script-doesnt-works/9617/5 "2020-10-12T09:20:05Z")

</div>

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.

> [@Earnings calculator (Detailed earnings info and health status of your node, including vetting progress and garbage collection status)](https://forum.storj.io/t/earnings-calculator-update-2020-09-15-v9-4-0-uptime-is-back-now-compatible-with-v1-12-and-more-verbose-warnings/1794):
>
> Latest version @ 2025-12-18: v14.3.0 - Consider minimum vetting time for vetting progress I made this calculator to provide payout information and be used as an extension of the dashboard functionality already provided by Storj. Storj Earnings Calculator Earnings calculation script for Storj storagenodes Prerequisites Python is required to run this script. This script was tested on Windows 10 and Linux, with Python 3.7. Other OS’s and versions will likely also work. Warning If you are runnin…

---

<div class="post-metadata">

**Author:** ![o1eal](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/o1eal/32/8836_2.png) [@o1eal](https://forum.storj.io/u/o1eal)\
**Post date:** [October 2, 2021, 10:23pm UTC](https://forum.storj.io/t/earnings-py-script-doesnt-works/9617/6 "2021-10-02T22:23:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [October 3, 2021, 8:42am UTC](https://forum.storj.io/t/earnings-py-script-doesnt-works/9617/7 "2021-10-03T08:42:34Z")

</div>

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](https://support.storj.io/hc/en-us/articles/360029309111-How-to-fix-a-database-disk-image-is-malformed-)

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