Running "pi-manage create_enckey" fails

Redhat 8.4, python 3.6.8, pip install
When I try to create the enckey with “pi-manage create_enckey” I get the following error.
Thank you in advance for your help.
(privacyidea) [privacyidea@s-vm10-rhel-linotp-routt-gov ~]$ pi-manage create_enckey
Traceback (most recent call last):
File “/opt/privacyidea/bin/pi-manage”, line 112, in
app = create_app(config_name=‘production’, silent=SILENT)
File “/opt/privacyidea/lib/python3.6/site-packages/privacyidea/”, line 127, in create_app
app.config.from_pyfile(config_file, silent=True)
File “/opt/privacyidea/lib/python3.6/site-packages/flask/”, line 132, in from_pyfile
exec(compile(, filename, “exec”), d.dict)
File “/etc/privacyidea/pi.cfg”, line 3
IndentationError: unexpected indent

Thank you,

Welcome and congrats to the decision to look into the possibility to replace another OTP solution with privacyIDEA. You will be much more flexible!

The pi.cfg file is interpreted as Python code.
The last line of the traceback tells you, that there is something wrong with the indentation.
So maybe you have a trailing whitespace.
Ensure that all lines (especially line no 3) to start right at the beginning of the line.

That was it.

Thank you for your quick response.


1 Like