我做了文档上的所有说明,但仍然出现此错误

时间:2018-07-11 15:37:16

标签: python flask

在服务器上找不到请求的URL。如果您手动输入网址,请检查拼写,然后重试

from flask import Flask
app = Flask(__name__)
@app.route('/user/<username>')
def show_user_profile(username):

    return 'User %s' % username
@app.route('/post/<int:post_id>')
def show_post(post_id):

    return 'Post %d' % post_id
@app.route('/path/<path:subpath>')
def show_subpath(subpath):

    return 'Subpath %s' % subpath

1 个答案:

答案 0 :(得分:0)

您没有定义归属路线(Sub Send_Email_Updated() Dim olApp As Object Dim NewMail As Object Dim NewMail1 As Object Dim ChartName As String Dim ChartName1 As String Dim SendingRng As Range Dim htmlString As String Dim OMail As Outlook.MailItem Set wb = ActiveWorkbook Set S1 = wb.Worksheets("Incident Tickets") Set S2 = wb.Worksheets("Assets and Representatives") Set S3 = wb.Worksheets("Email") 'Set SendingRng = Worksheets("Email").Table("A30:C43") Set SendingRng = Worksheets("Email").Range("A30:C43") Set olApp = CreateObject("Outlook.Application") Set OMail = olApp.CreateItem(olMailItem) ' Group 1 If S3.Cells(7, 2) <> 0 Or S3.Cells(8, 2) <> 0 Or S3.Cells(9, 2) <> 0 Then OMail.Display 'fill in the file path/name of the gif file app graph ChartName = Environ$("Temp") & "\Chart 1.gif" ActiveWorkbook.Worksheets("Email").ChartObjects("Chart 1").Chart.Export _ Filename:=ChartName, FilterName:="GIF" 'fill in the file path/name of the gif file trend graph ChartName1 = Environ$("Temp") & "\Chart 31.gif" ActiveWorkbook.Worksheets("Email").ChartObjects("Chart 31").Chart.Export _ Filename:=ChartName1, FilterName:="GIF" Set NewMail = olApp.CreateItem(0) With NewMail .Subject = "Action Required on Incidents and Problem Candidates for GC060.1 - Group 1" .To = "animesh.das@xyz.com" .HTMLBody = "<img src=" & "'" & ChartName1 & "'>" & "<br/>" & "<br/>" & "_ "<img src=" & "'" & ChartName & "'>" & "<br/>" & "<br/>" & _ .Send End With ChartName = vbNullString ChartName1 = vbNullString End If End Sub )。因此,当您启动应用程序并按照应用程序设置说明中的指定导航至URL时,将显示上面发布的错误。只需导航到您声明的其他路线之一即可:

/

为避免出现此消息,请按照以下方式创建路由:

/user/someting
/post/someval
/path/somepath