Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6042017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:44:37+00:00 2026-05-23T06:44:37+00:00

I use web.py write small helloworld site,but when I run python code.py I get

  • 0

I use web.py write small helloworld site,but when I run python code.py I get an error message:

Traceback (most recent call last):   File "E:\Python25\webpy\web\mysite.py", line 1, in <module>
    import web   File "E:\Python25\webpy\web\web.py", line 4, in <module>
    app = web.application(urls, globals()) AttributeError: 'module' object has no attribute 'application'

Here is my code(paste from web.py’s tutorials):

import web

urls = ( '/','Index',
)

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

app=web.application(urls,globals())

if __name__=="__main__":
  app.run(

P.S:The web.py version is 0.35.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:44:37+00:00Added an answer on May 23, 2026 at 6:44 am

    You are runing into name collisions. You named your package web, and are trying to import a module web.

    I am assuming this is in a package?

    \webpy\web\mysite.py

    If so when you do import web you are importing your package not the actual web.py. Rename it, or reorder your pythonpath.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use the Web Browser control within an mono application, but when
As I use the web, I regularly get runtime errors (usually javascript) being reported
What makes Python stand out for use in web development? What are some examples
I have to write a web service and I want to use WCF. The
Can anyone suggest a good reason to use web services instead of RPC (not
I have some business objects which use: Web.Configuration.WebConfigurationManager.AppSettings.Item(SomeSetting) Now that I'm breaking those objects
I am looking for specific guidelines for when to use Web Services frameworks versus
I use System.Web.Services.WebMethodAttribute to make a public static method of an ASP.NET page callable
I want to use the Web Tools Editor that is part of the Web
We have got a setup where users can either use a web-based form or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.