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 8506739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:40:29+00:00 2026-06-11T02:40:29+00:00

I copied a module to the modules folder of the application in web2py. When

  • 0

I copied a module to the “modules” folder of the application in web2py. When I tried to import the module in any function inside of any of the controllers, I get the following error:

<type 'exceptions.ImportError'> No module named module_name

I get that error irrespective of any module used. But if I copied the same module to the “site-packages” and import it, it works perfectly.

I found out that the “sys.path” doesn’t contain the modules folder but contains the “site-packages” folder.

How do I add the modules folder to “sys.path” specific for web2py or are there any other ways to solve this problem?

  • 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-06-11T02:40:30+00:00Added an answer on June 11, 2026 at 2:40 am

    Finally found a solution to my problem.

    Seems like in order to import a module in the module directory using import module_name, the name of the application must be in all lower case.

    Previously, the name of my application was projectX, but when I changed it to projectx the import module_name worked like it should.

    I also found out that explicitly stating the application name while importing the module also works, no matter how the application name is. import applications.projectX.modules.module_name also worked for me when the name of the application was projectX.

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

Sidebar

Related Questions

I copied the timeAgo category for NSDate in XCODE4, but i get the following
I have created titanium mobile module project and copied .zip file to /lib folder
Lets say I have two modules. Is it possible to include a module inside
Copied from my log file ActionView::Template::Error (Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs
copied a UITable to a other Storyboard, now I cannot see any rows ?
I copied the example straight from their page: http://jsfiddle.net/D2RLR/631/ ... and I get the
I have troubles using the java ServiceLoader in a NetBeans module application. Here is
I am trying to get a basic idea of how the os.system module can
I want to install this module: node-poormansmysql . My nodejs application is installed in
I have copied my home folder from a Mac OSX 10.5 to a new

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.