First time here? Check out the FAQ!

Revision history  [back]

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.

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.

How 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

└─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.

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.