File "C:\Users\YL198023\Desktop\main.py", line 111 urls = ( '/',…
Jump to turn (7)
- 1File "C:\Users\YL198023\Desktop\main.py", line 111 urls = ( '/', 'IndexHandler',
- 2翻译
- 3File "C:\Users\YL198023\Desktop\main.py", line 112 class IndexHandler: Indentati
- 4翻译
- 5– coding: gbk – from http.server import BaseHTTPRequestHandler, HTTPServer from
- 6File "C:\Users\YL198023\Desktop\main.py", line 112 urls = ( '/', 'IndexHandler',
- 7翻译
- User
File "C:\Users\YL198023\Desktop\main.py", line 111 urls = ( '/', 'IndexHandler','/check', 'CheckHandler',) IndentationError: expected an indented block after class definition on line 109
- Assistant
The error message "IndentationError: expected an indented block after class definition" typically occurs when there is a missing indentation after a class definition or any other block of code that requires indentation in Python.
In your specific case, it seems like you have defined a class on line 109, but you have not indented the next line correctly. To fix this error, you should indent the line starting with
urls = (to indicate that it is part of the class definition.Here's an example of how the code should be indented correctly:
pythonclass ClassName: # class definition urls = ( '/', 'IndexHandler','/check', 'CheckHandler',)