Manuel installation error : jobs.py : OverflowError: Python int too large to convert to SQLite INTEGER
See original GitHub issueFollowing : https://github.com/cryptosharks131/lndg#step-1---install-lndg
I get an error at step 8. Generate some initial data for your dashboard .venv/bin/python jobs.py
Tried to delete the db and redo the initialization. Tried to remove lndg folder and restart from step 1.
user@hostname:~$ git clone https://github.com/cryptosharks131/lndg.git
Cloning into 'lndg'...
remote: Enumerating objects: 2108, done.
remote: Counting objects: 100% (2085/2085), done.
remote: Compressing objects: 100% (878/878), done.
remote: Total 2108 (delta 1469), reused 1704 (delta 1149), pack-reused 23
Receiving objects: 100% (2108/2108), 686.20 KiB | 2.48 MiB/s, done.
Resolving deltas: 100% (1469/1469), done.
user@hostname:~$ cd lndg
user@hostname:~/lndg$ virtualenv -p python3 .venv
created virtual environment CPython3.9.2.final.0-64 in 216ms
creator CPython3Posix(dest=/home/user/lndg/.venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/user/.local/share/virtualenv)
added seed packages: pip==20.3.4, pkg_resources==0.0.0, setuptools==44.1.1, wheel==0.34.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
user@hostname:~/lndg$ .venv/bin/pip install -r requirements.txt
Collecting Django
Using cached Django-4.0.2-py3-none-any.whl (8.0 MB)
Collecting djangorestframework
Using cached djangorestframework-3.13.1-py3-none-any.whl (958 kB)
Collecting django-qr-code
Using cached django_qr_code-3.0.0-py3-none-any.whl (28 kB)
Collecting grpcio
Using cached grpcio-1.43.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB)
Collecting protobuf
Using cached protobuf-3.19.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
Collecting pytz
Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting pandas
Using cached pandas-1.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)
Collecting sqlparse>=0.2.2
Using cached sqlparse-0.4.2-py3-none-any.whl (42 kB)
Collecting asgiref<4,>=3.4.1
Using cached asgiref-3.5.0-py3-none-any.whl (22 kB)
Collecting segno
Using cached segno-1.4.1-py2.py3-none-any.whl (82 kB)
Collecting six>=1.5.2
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting numpy>=1.18.5
Using cached numpy-1.22.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
Collecting python-dateutil>=2.8.1
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Installing collected packages: sqlparse, six, asgiref, segno, pytz, python-dateutil, numpy, Django, protobuf, pandas, grpcio, djangorestframework, django-qr-code
Successfully installed Django-4.0.2 asgiref-3.5.0 django-qr-code-3.0.0 djangorestframework-3.13.1 grpcio-1.43.0 numpy-1.22.2 pandas-1.4.0 protobuf-3.19.4 python-dateutil-2.8.2 pytz-2021.3 segno-1.4.1 six-1.16.0 sqlparse-0.4.2
user@hostname:~/lndg$ .venv/bin/python initialize.py
Setting up initial user...
Superuser created successfully.
FIRST TIME LOGIN PASSWORD:
user@hostname:~/lndg$ .venv/bin/python jobs.py
Traceback (most recent call last):
File "/home/user/lndg/jobs.py", line 37, in update_payments
Paymenthostnames(payment_hash=new_payment, attempt_id=attempt.attempt_id, step=hostname_count, chan_id=hostname.chan_id, alias=alias, chan_capacity=hostname.chan_capacity, node_pubkey=hostname.pub_key, amt=round(hostname.amt_to_forward_msat/1000, 3), fee=round(fee, 3), cost_to=round(cost_to, 3)).save()
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/base.py", line 885, in _save_table
results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/base.py", line 923, in _do_insert
return manager._insert(
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/query.py", line 1301, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1441, in execute_sql
cursor.execute(sql, params)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 416, in execute
return Database.Cursor.execute(self, query, params)
OverflowError: Python int too large to convert to SQLite INTEGER
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/lndg/jobs.py", line 248, in <module>
main()
File "/home/user/lndg/jobs.py", line 241, in main
update_payments(stub)
File "/home/user/lndg/jobs.py", line 74, in update_payments
Paymenthostnames(payment_hash=db_payment, attempt_id=attempt.attempt_id, step=hostname_count, chan_id=hostname.chan_id, alias=alias, chan_capacity=hostname.chan_capacity, node_pubkey=hostname.pub_key, amt=round(hostname.amt_to_forward_msat/1000, 3), fee=round(fee, 3), cost_to=round(cost_to, 3)).save()
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/base.py", line 885, in _save_table
results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/base.py", line 923, in _do_insert
return manager._insert(
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/query.py", line 1301, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1441, in execute_sql
cursor.execute(sql, params)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/home/user/lndg/.venv/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 416, in execute
return Database.Cursor.execute(self, query, params)
OverflowError: Python int too large to convert to SQLite INTEGER
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
peewee: Python int too large to convert to SQLite INTEGER
The code gives me the error mentioned above. After that if I try to insert the values by hand I have no problems...
Read more >How do I fix - Python int too large to convert to SQLite INTEGER
I under understand why this is a problem, I have been getting much more data than this normally and its been fine, but...
Read more >Python int too large to convert to SQLite INTEGER ... - GitHub
Seems there's a problem with long value (>0x7FFFFFFFFFFFFFFF) and sqlite... C:\Volatility\volatility-e9cbdcc6c7>python vol.py -f ...
Read more >terms.teach: OverflowError: Python int too large to convert to ...
OverflowError : Python int too large to convert to SQLite INTEGER. image. I get this error if I feed in more than 1...
Read more >Python OverflowError | Working of Overflow Error in ... - eduCBA
Here we discuss an introduction to Python OverflowError, how does it work ... it will throw an error saying Python int is too...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for all of this detail, it seems like you have found the issue!
Since this appears to be a valid channel id, it may be better to start storing these channel ids as a string similar to the pubkey is currently but with a max length of 20.
Resolved in #51