Hello, iam using Python + Flask. Iam trying to print some html and also serve a file to the user. My code is:
pdata = pdata + '''<img src="/static/img/arrow.gif" align="left">''' # Prepare selected file for download.... filename = request.form.get('filename') filepath = '/home/user/wsgi/static/files/' yield send_from_directory( filepath, filename, as_attachment=True ) return pdata The error i'm receiving is: TypeError: 'generator' object is not callable The view function did not return a valid response. The return type must be a string, tuple, Response instance, or WSGI callable, but it was a generator. Can you help me understand why iam getting this error and how i should write it? -- https://mail.python.org/mailman/listinfo/python-list