0

console log:

[2021-01-15 07:30:20 +0530] [11592] [ERROR] Exception occurred while handling uri: 'http://localhost:5002/api/auth'
Traceback (most recent call last):
  File "c:\users\adity\venv\lib\site-packages\rasa\cli\x.py", line 494, in run_locally
    local.main(
TypeError: main() got an unexpected keyword argument 'domain_path'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\adity\venv\lib\site-packages\sanic\app.py", line 914, in handle_request
    response = await response
  File "c:\users\adity\venv\lib\site-packages\sanic_jwt\endpoints.py", line 36, in post
    access_token, output = await self.responses.get_access_token_output(
  File "c:\users\adity\venv\lib\site-packages\sanic_jwt\responses.py", line 19, in get_access_token_output
    access_token = await instance.auth.generate_access_token(user)
  File "c:\users\adity\venv\lib\site-packages\sanic_jwt\authentication.py", line 477, in generate_access_token
    return jwt.encode(payload, secret, algorithm=algorithm).decode("utf-8")
AttributeError: 'str' object has no attribute 'decode'
dodekja
  • 537
  • 11
  • 24

1 Answers1

3

In my case with Ubuntu 20.04, after upgrading from Rasa X 0.39.1 and sanic-jwt 1.5.0 to Rasa X 0.39.2 and sanic-jwt 1.6.0, the problem solved.
I guess I have messed up with sanic-jwt version when upgrading Rasa Core. Because the new backtracking from pip >= 20.3 will downgrade sanic-jwt to 1.5.0 for the requirements to install Rasa Core.

Hoai Nam
  • 45
  • 10