Environment:
Request Method: POST
Request URL: http://192.168.0.107:8000/TSP_app/
Django Version: 3.1.5
Python Version: 3.9.1
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'polls.apps.PollsConfig',
'accounts',
'TSP_app',
'rest_framework',
'API_TSP',
'bootstrap5',
'TSP_server']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback (most recent call last):
File "/home/ts/Dev/Django/mysite/Django_app/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/ts/Dev/Django/mysite/Django_app/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ts/Dev/Django/mysite/TSP_app/views.py", line 27, in home
'private_key': gpg.export_keys(key, True, passphrase=passphrase),
File "/home/ts/Dev/Django/mysite/Django_app/lib/python3.9/site-packages/gnupg.py", line 1306, in export_keys
self._handle_io(args, f, result, passphrase=passphrase,
File "/home/ts/Dev/Django/mysite/Django_app/lib/python3.9/site-packages/gnupg.py", line 1028, in _handle_io
p = self._open_subprocess(args, passphrase is not None)
File "/home/ts/Dev/Django/mysite/Django_app/lib/python3.9/site-packages/gnupg.py", line 934, in _open_subprocess
result = Popen(cmd, shell=False, stdin=PIPE, stdout=PIPE, stderr=PIPE,
File "/usr/lib/python3.9/subprocess.py", line 947, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1752, in _execute_child
self.pid = _posixsubprocess.fork_exec(
Exception Type: TypeError at /TSP_app/
Exception Value: expected str, bytes or os.PathLike object, not GenKey