Masonite - TypeError > encoding without a string argument

197 Views Asked by At

Whenever I render a view, the error

encoding without a string argument`

is being thrown. This is my controller method:

def show(self, Application):
    view('welcome', {'app': Application})
1

There are 1 best solutions below

0
On BEST ANSWER

This error is being thrown because your view is not returning anything. Your view should always have a return in it because Masonite needs to know what you want to display.

You can fix this error by returning the view:

def show(self, Application):
    return view('welcome', {'app': Application})