Forums

Python Script Not Running with HTML

Hello, I use python and HTML on django when I run on localhost it prints output but when I run on pythonanywhere it doesn't print any output. I guess it might be sys.executable. Help me plz. Thank you

code in views.py

image= run([sys.executable,'/home/aaomsin/test2/ncratio.py',str(fileurl),str(filename)],shell=True,stdout=PIPE)

output

CompletedProcess(args=['/usr/local/bin/uwsgi', '/home/aaomsin/test2/ncratio.py', '/home/aaomsin/test2/media/4_hDpvXJ1.jpg', '4_hDpvXJ1.jpg'], returncode=1, stdout=b'')
>> stdout just print b" not output

[edit by admin: formatting]

Could you explain a little more about what you're trying to do here? It looks like your script is trying to run itself.