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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:19:20+00:00 2026-05-31T04:19:20+00:00

I am doing a mini project in python. My base folder is ‘DB’. When

  • 0

I am doing a mini project in python. My base folder is ‘DB’. When imports are between files in this folder they work fine. I have a folder ‘GUI’ inside my ‘DB’ folder. When I do imports between files within this ‘GUI’ folder it gives error.

So I tried moving the files to the base folder and imports worked fine.

So how can I make my import work fine as well as have those files in ‘GUI’ folder.

projects/DB/GUI/frame.py:

class mygui:
    ...
    ....

projects/DB/GUI/wrapper.py:

from frame import mygui  # ===>error

P.S.This is my first Py project.

  • 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-31T04:19:23+00:00Added an answer on May 31, 2026 at 4:19 am

    do you have a (probably empty) __init__.py file in your subdirectory?

    (Python needs one to consider the directory as a module package that is importable.)

    then try to do

    from GUI.frame import mygui
    

    you also need this step if GUI modules import other GUI modules (given your working directory is the base path).

    see this article for more details on this.

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

Sidebar

Related Questions

As I've said: Jquery doesn't work .this selection, what am I doing wrong? altho
I am doing a mini project and i am stuck with a code. My
I have been doing a little recreational holiday computing. My mini-project was a simulation
I am working on a mini-project which consists of doing a client-server chat application.
Doing some SOAP calls to a 3rd party application. They provide this soap header
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
Doing code analysis of the project and get the message Reference-counted object is used
I am looking to start work on a brand-new project, something I've been thinking
Ok so me and a friend are doing a mini presentation on PHP security
I'm after creating a simple mini-language parser in Python, programming close to the problem

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.