Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite3.OperationalError: database or disk is full #2 #1218

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

sqlite3.OperationalError: database or disk is full #2 #1218

wants to merge 1 commit into from

Conversation

PushKK
Copy link
Contributor

@PushKK PushKK commented May 23, 2021

For https://gramps-project.org/bugs/view.php?id=12306

  1. Add check disk space before close db, save config file, autobackup and XML
    backup.
  2. Add new function get_avail_disk_size().

I have problem: I can't restore connection to window in quit() if user abort to
quit.

For https://gramps-project.org/bugs/view.php?id=12306
1. Add check disk space before close db, save config file, autobackup and XML
backup.
2. Add new function get_avail_disk_size().

I have problem: I can't restore connection to window in quit() if user abort to
quit.
@codecov-commenter
Copy link

Codecov Report

Merging #1218 (8e219d5) into master (24a763b) will decrease coverage by 0.01%.
The diff coverage is 1.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1218      +/-   ##
==========================================
- Coverage   41.16%   41.14%   -0.02%     
==========================================
  Files        1062     1062              
  Lines      144703   144771      +68     
==========================================
+ Hits        59564    59565       +1     
- Misses      85139    85206      +67     
Impacted Files Coverage Δ
gramps/gui/viewmanager.py 0.00% <0.00%> (ø)
gramps/gen/utils/file.py 57.53% <10.00%> (-3.50%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24a763b...8e219d5. Read the comment docs.

# import psutil
# DISK = get disk from 'dbfolder'
# freedisk = psutil.disk_usage(DISK).free/(1024*1024)
# print(f"{freedisk:.4} Mb free on disk {DISK}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.python.org/3/library/shutil.html should be used here to get the disk space free "shutil.disk_usage(path)" as it is supposed to work across platforms as of Python 3.3 (which we are now requiring). And we already use the shutil library, so no new dependencies.

Copy link
Contributor Author

@PushKK PushKK May 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I didn't know about this function.

@Nick-Hall
Copy link
Member

@PushKK Does this replace #1212?

@PushKK
Copy link
Contributor Author

PushKK commented May 26, 2021

I had problems with PR. All my commit join to last PR, @1212 created without .py file...

@Nick-Hall Nick-Hall added the string Requires string changes label Jul 14, 2023
@Nick-Hall Nick-Hall marked this pull request as draft July 17, 2023 22:20
@Nick-Hall
Copy link
Member

I have converted this PR to draft because it is not ready for merging.

It doesn't work for Mac or Windows yet.

@Nick-Hall Nick-Hall removed the string Requires string changes label Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants