This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Bugs in Web app
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Mahira, mark.dickinson, terry.reedy
Priority: normal Keywords:

Created on 2017-06-03 08:36 by Mahira, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg295071 - (view) Author: Mahira (Mahira) Date: 2017-06-03 08:36
Hai 

I followed your Tutorial
In the Following Program, i am getting 
Traceback (most recent call last):
  File "C:\Users\Mahira\AppData\Local\Programs\Python\Python36\Scripts\localhost.py", line 1, in <module>
    import web
  File "C:\Users\Mahira\AppData\Local\Programs\Python\Python36\Scripts\web.py", line 6, in <module>
    app = web.application(("urls"),globals())
AttributeError: module 'web' has no attribute 'application'

And my program is:

import web

urls = (
    '/', 'index'
)

class index:
    def GET(self):
        return "Hello, world!"

if __name__ == "__main__":
    app = web.application(urls, globals())
    app.run()
msg295072 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2017-06-03 09:17
Hi Mahira,

This site is for reporting bugs in the Python core language itself, not bugs in code written by users.

You appear to be using the "Learn Python the Hard Way" tutorial, which is a third-party resource that's not maintained by the Python language developers. You might want to try asking your questions on one of the Python mailing lists (see https://www.python.org/community/lists/), or the "Learn Code the Hard Way" chat room: https://gitter.im/lcthw/Lobby
msg295083 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-03 15:42
It is good that you included both a short program and the full traceback. Too many beginners don't do that when asking questions.  Three comments: your program does not have syntax errors and compiled just fine; exceptions almost never involved the editor/IDE you happen to use; if 'web' comes from a book, its discussion group should be your best bet.
History
Date User Action Args
2022-04-11 14:58:47adminsetgithub: 74744
2017-06-03 15:42:44terry.reedysetassignee: terry.reedy ->
type: compile error -> behavior
messages: + msg295083
2017-06-03 09:17:48mark.dickinsonsetstatus: open -> closed

nosy: + mark.dickinson
messages: + msg295072

resolution: not a bug
stage: resolved
2017-06-03 08:36:44Mahiracreate