You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error when I try see payment_details view
`
RuntimeError at /payment/3
Trying to access master database in slave state
Request Method: | GET
-- | --
http://127.0.0.1:8000/payment/3
4.2.7
RuntimeError
Trying to access master database in slave state
C:\Users\admin\wwork\env\lib\site-packages\django_replicated\router.py, line 78, in db_for_write
openbook_payments.views.payment_details
C:\Users\admin\wwork\env\Scripts\python.exe
3.8.0
['C:\\Users\\admin\\wwork\\ok-api', 'c:\\users\\admin\\appdata\\local\\programs\\python\\python38\\python38.zip', 'c:\\users\\admin\\appdata\\local\\programs\\python\\python38\\DLLs', 'c:\\users\\admin\\appdata\\local\\programs\\python\\python38\\lib', 'c:\\users\\admin\\appdata\\local\\programs\\python\\python38', 'C:\\Users\\admin\\wwork\\env', 'C:\\Users\\admin\\wwork\\env\\lib\\site-packages']
Sun, 31 Dec 2023 12:24:51 +0100
You’re seeing this error because you haveDEBUG = Truein your Django settings file. Change that toFalse, and Django will display a standard page generated by the handler for this status code.
DJDT
RuntimeError at /payment/3
Trying to access master database in slave state
Request Method: GET
Request URL: http://127.0.0.1:8000/payment/3
Django Version: 4.2.7
Exception Type: RuntimeError
Exception Value:
Trying to access master database in slave state
Exception Location: C:\Users\admin\wwork\env\lib\site-packages\django_replicated\router.py, line 78, in db_for_write
Raised during: openbook_payments.views.payment_details
Python Executable: C:\Users\admin\wwork\env\Scripts\python.exe
Python Version: 3.8.0
Python Path:
['C:\\Users\\admin\\wwork\\ok-api',
'c:\\users\\admin\\appdata\\local\\programs\\python\\python38\\python38.zip',
'c:\\users\\admin\\appdata\\local\\programs\\python\\python38\\DLLs',
'c:\\users\\admin\\appdata\\local\\programs\\python\\python38\\lib',
'c:\\users\\admin\\appdata\\local\\programs\\python\\python38',
'C:\\Users\\admin\\wwork\\env',
'C:\\Users\\admin\\wwork\\env\\lib\\site-packages']
Server time: Sun, 31 Dec 2023 12:24:51 +0100
Traceback [Switch to copy-and-paste view](http://127.0.0.1:8000/payment/3#)
C:\Users\admin\wwork\env\lib\site-packages\django\core\handlers\exception.py, line 42, in inner
response = await get_response(request) …
Local vars
C:\Users\admin\wwork\env\lib\site-packages\django\core\handlers\base.py, line 253, in _get_response_async
response = await wrapped_callback( …
Local vars
C:\Users\admin\wwork\ok-api\openbook_payments\views.py, line 13, in payment_details
form = payment.get_form(data=request.POST or None) …
Local vars
C:\Users\admin\wwork\env\lib\site-packages\payments\models.py, line 143, in get_form
return provider.get_form(self, data=data) …
Local vars
C:\Users\admin\wwork\env\lib\site-packages\payments\dummy\__init__.py, line 25, in get_form
payment.change_status(PaymentStatus.INPUT) …
Local vars
C:\Users\admin\wwork\env\lib\site-packages\payments\models.py, line 97, in change_status
self.save(update_fields=["status", "message"]) …
Local vars
C:\Users\admin\wwork\env\lib\site-packages\payments\models.py, line 128, in save
return super().save(**kwargs) …
Local vars
C:\Users\admin\wwork\env\lib\site-packages\django\db\models\base.py, line 780, in save
using = using or router.db_for_write(self.__class__, instance=self) …
Local vars
C:\Users\admin\wwork\env\lib\site-packages\django\db\utils.py, line 227, in _route_db
chosen_db = method(model, **hints) …
Local vars
C:\Users\admin\wwork\env\lib\site-packages\django_replicated\router.py, line 78, in db_for_write
raise RuntimeError('Trying to access master database in slave state') …
Local vars`
The text was updated successfully, but these errors were encountered:
I get this error when I try see payment_details view
`
RuntimeError at /payment/3
Request Method: | GET -- | -- http://127.0.0.1:8000/payment/3 4.2.7 RuntimeError Trying to access master database in slave state C:\Users\admin\wwork\env\lib\site-packages\django_replicated\router.py, line 78, in db_for_write openbook_payments.views.payment_details C:\Users\admin\wwork\env\Scripts\python.exe 3.8.0 ['C:\\Users\\admin\\wwork\\ok-api', 'c:\\users\\admin\\appdata\\local\\programs\\python\\python38\\python38.zip', 'c:\\users\\admin\\appdata\\local\\programs\\python\\python38\\DLLs', 'c:\\users\\admin\\appdata\\local\\programs\\python\\python38\\lib', 'c:\\users\\admin\\appdata\\local\\programs\\python\\python38', 'C:\\Users\\admin\\wwork\\env', 'C:\\Users\\admin\\wwork\\env\\lib\\site-packages'] Sun, 31 Dec 2023 12:24:51 +0100You’re seeing this error because you have
DEBUG = True
in your Django settings file. Change that toFalse
, and Django will display a standard page generated by the handler for this status code.The text was updated successfully, but these errors were encountered: