First time here? Check out the FAQ!

justinxp's profile - activity

2020-10-27 07:43:13 -0500 received badge Famous Question (source)
2020-10-27 07:43:13 -0500 marked best answer How to set the root directory

Dear all,

Error:
 File "e:\aa_work\pythonstock\jobs\18h_daily_job.py", line 5, in <module>
  import libs.common as common

builtins.ModuleNotFoundError: No module named 'libs.common'

Below is the working directory of my project, I have some mainly .py in the sub directory called jobs. These job need to import the module of "libs", how to set the root directory?

E:.
├─docker
├─jobs -> *
├─libs -> *
├─old_jobs
├─supervisor
└─web

These are some settings I try in wing, but it does not work. Edit -> Preferences -> Files -> Default Directory Policy: Use Project's Home Directory Project-> Project Properties -> Debug/Execute -> Initial Directory -> custom: e:\aa_work\pythonstock Project-> Project Properties -> Options -> Project Home Directory -> Specified Directory: e:\aa_work\pythonstock

By the ways, if it's convenient, please tell me why none of this works.

I have checked the manual, but do not figure out yet.

2020-10-22 19:29:32 -0500 received badge Notable Question (source)
2020-10-22 06:27:17 -0500 answered a question How to set the root directory

Thanks, I see. BTW, adding the parent directory of 'libs' to the Python Path: Project-> Project Properties -> Env

2020-10-22 05:53:58 -0500 received badge Popular Question (source)
2020-10-21 06:45:37 -0500 received badge Student (source)
2020-10-21 06:45:05 -0500 asked a question How to set the root directory

how to set the root directory Dear all, Error:  File "e:\aa_work\pythonstock\jobs\18h_daily_job.py", line 5, in <mo