python을 처음 접했을 때 python anywhere에 새롭게 등장한 트리플 뉴비 위협에 대해 미리주의 깊게 살펴보십시오.pythonanywhere + flask : 웹 사이트에 '처리되지 않은 예외'라고 나와 있습니다. 스택 추적을 인쇄하는 디버거를 얻는 방법?
[pythonanywhere 루트는,
# A very simple Flask Hello World app for you to get started with...
from flask import Flask
from flask import render_template # for templating
#from flask import request # for handling requests eg form post, etc
app = Flask(__name__)
app.debug = True #bshark: turn on debugging, hopefully?
@app.route('/')
#def hello_world():
# return 'Hello from Flask! wheee!!'
def buildOrg():
orgname = 'ACME Inc'
return render_template('index.html', orgname)
그리고 내가 사이트를 공격 할 때
<!doctype html>
<head><title>Test01 App</title></head>
<body>
{% if orgname %}
<h1>Welcome to {{ orgname }} Projects!</h1>
{% else %}
<p>Aw, the orgname wasn't passed in successfully :-(</p>
{% endif %}
</body>
</html>
/templates/index.html [pythonanywhere 루트]에서를 /mysite/test01.py '처리되지 않은 예외'가 발생합니다 : 적어도 문제를 찾기 시작할 곳에서 디버거를 뱉어 낼 수 있습니까?
"웹"탭에서 오류 로그를보십시오. –
omg ... thx! 그것은 'TypeError : render_template()는 1 개의 위치 인수를 취하지 만 2는 주어진 것입니다.'클래스 메소드가 첫 번째 인수가 자기가되기를 기대하는 것은 그런 것입니까? hrm ... – babyshark
또한, 거기에있는 모든 파이썬 오류를 볼 수있는 대답으로 귀하의 의견을 수락하고 싶습니다. 대답으로 다시 말하면 받아 들일 수 있습니다. – babyshark