attempt to write a readonly database

619 views
Skip to first unread message

Parul.

unread,
Dec 23, 2020, 11:19:25 AM12/23/20
to django...@googlegroups.com

OperationalError at /users/

Request Method:POST
Request URL:http://localhost:8000/users/
Django Version:3.0.3
Exception Type:OperationalError
Exception Value:
attempt to write a readonly database
Exception Location:C:\Users\parul\anaconda\envs\MyDjangoEnv\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 396
Python Executable:C:\Users\parul\anaconda\envs\MyDjangoEnv\python.exe
Python Version:3.8.5
Python Path:
['C:\\Users\\parul\\Desktop\\Djangoforms\\ProTwo',
 'C:\\Users\\parul\\anaconda\\envs\\MyDjangoEnv\\python38.zip',
 'C:\\Users\\parul\\anaconda\\envs\\MyDjangoEnv\\DLLs',
 'C:\\Users\\parul\\anaconda\\envs\\MyDjangoEnv\\lib',
 'C:\\Users\\parul\\anaconda\\envs\\MyDjangoEnv',
 'C:\\Users\\parul\\anaconda\\envs\\MyDjangoEnv\\lib\\site-packages']
Server time:Wed, 23 Dec 2020 16:14:46 +0000




--------->>> Also, i checked the properties in db.sqlite3, all the permissions are checked...write permission also
can anyone help 

Bryan Anderson bautista garcia

unread,
Dec 23, 2020, 12:27:47 PM12/23/20
to django...@googlegroups.com

hello, I don't know who you are, you're the wrong person  

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHjHRFoBMq5VCKnBPiCEgSrLvZ7P0vvwd5Ah-_cDOv8kX1oKhg%40mail.gmail.com.

MALVIYA IT WEB

unread,
Dec 23, 2020, 12:28:02 PM12/23/20
to django...@googlegroups.com
try from  your end or contact me 8696067700 on monday 


--

Parul.

unread,
Dec 24, 2020, 2:23:24 AM12/24/20
to django...@googlegroups.com
Can anyone help with this?

Steven Mapes

unread,
Dec 30, 2020, 9:48:33 AM12/30/20
to Django users
This normally means that the user you are running your project as does not have access to the SQLLite database file. I can see that you are running on windows so fine the database in the file system and check and change the owner as well as ensuring that the owner/group has read/write access to the file.

RANGA BHARATH JINKA

unread,
Dec 30, 2020, 10:16:08 AM12/30/20
to django...@googlegroups.com
hi,

Try running as the root user using sudo permissions.

All the best

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.


--
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

Govind Kumar Yadav

unread,
Dec 30, 2020, 11:14:10 AM12/30/20
to django...@googlegroups.com
I got the same error when I deployed my Django web app over Nginx server and tried to access Django admin. If anyone knows the solution please revert back.
regards,
govind



Steven Mapes

unread,
Dec 30, 2020, 11:23:12 AM12/30/20
to Django users
It's a permissions error on the file.  For those running Linux change to the directory and type  ls -l *.sqllite so we can see who the owner and group are on the file. If you are running nginx it should be the same user as nginx is configured to run as (www-data) by default.  If the owner (or group) are www-data then look at the permissions, does that user/group have read and write on the file.

If you are on windows it's the same issue either the owner or the file permissions are wrong

Reply all
Reply to author
Forward
0 new messages