Bracket is not there. You actually print is called with parameters.
print('/home/user/folder/app', '/upload/')
Therefore, a space appears between the output lines. '/upload/' should fall into the os.path.join() parameters.
You:
print(os.path.join(os.path.dirname(os.path.realpath('wsgi.py'))),'/upload/')
And should be:
print(os.path.join(os.path.dirname(os.path.realpath('wsgi.py')),'/upload/'))
Well and in order not to get confused in brackets and commas it is better to break into separate stages (calculation and conclusion):
p = os.path.join(os.path.dirname(os.path.realpath('wsgi.py')),'/upload/') print(p)