Following the documentation to create the example project, I've found this error with the creatersakey
management command using Python 3.4 and the branch v0.2.x:
$ python manage.py creatersakey
Traceback (most recent call last):
File "/home/pabluk/dev/projects/django-oidc-provider/venv/lib/python3.4/site-packages/oidc_provider/management/commands/creatersakey.py", line 15, in handle
f.write(key.exportKey('PEM'))
TypeError: must be str, not bytes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/pabluk/dev/projects/django-oidc-provider/venv/lib/python3.4/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/home/pabluk/dev/projects/django-oidc-provider/venv/lib/python3.4/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/pabluk/dev/projects/django-oidc-provider/venv/lib/python3.4/site-packages/django/core/management/base.py", line 390, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/pabluk/dev/projects/django-oidc-provider/venv/lib/python3.4/site-packages/django/core/management/base.py", line 441, in execute
output = self.handle(*args, **options)
File "/home/pabluk/dev/projects/django-oidc-provider/venv/lib/python3.4/site-packages/oidc_provider/management/commands/creatersakey.py", line 18, in handle
self.stdout.write('Something goes wrong: ' + e.message)
AttributeError: 'TypeError' object has no attribute 'message'
Running the same command in Python 2.7 works as expected.