nestauk / dap_prinz_green_jobs

Identifying green occupations/skills/industries in job adverts
MIT License
3 stars 0 forks source link

ModuleNotFoundError: No module named 'ojd_daps_skills.pipeline' #133

Open NTHB-BFSU opened 2 weeks ago

NTHB-BFSU commented 2 weeks ago

Dear Developer Team,

I am encountering a ModuleNotFoundError related to the ojd_daps_skills library while trying to use the GreenMeasures class from the dap_prinz_green_jobs library. The error message indicates that the pipeline module is not found within the ojd_daps_skills library.

Steps taken:

  1. Cloned the ojd_daps_skills and dap_prinz_green_jobs repositories from GitHub.
  2. Installed the required dependencies for both libraries.
  3. Attempted to import the GreenMeasures class from dap_prinz_green_jobs.pipeline.green_measures.green_measures.

Error Message: ModuleNotFoundError: No module named 'ojd_daps_skills.pipeline'

Upon inspecting the ojd_daps_skills repository, I noticed that there is no pipeline directory.

Could you please provide guidance on:

  1. Whether the pipeline module has been moved or renamed in the ojd_daps_skills library.
  2. Any updates or patches available to address this issue.
  3. Recommended steps or best practices for integrating these two libraries.

Thank you for your assistance.

NTHB-BFSU commented 2 weeks ago

@sqr00t @mindrones @saabi @georgerichardson Thank you for your help!

sqr00t commented 2 weeks ago

Hi @NTHB-BFSU ,

Instead of cloning the libraries. Could you install the repository by adding them as a dependency in the project you're working from?

Based on your workflow, you would need to activate the dap_prinz_green_jobs conda environment, then work using this conda environment.

If your intent is to use these libraries in a separate project, i.e. one with dependencies defined with a requirements.txt file, i.e. in your requirements.txt you should have the below

git+https://github.com/nestauk/dap_prinz_green_jobs.git
git+https://github.com/nestauk/ojd_daps_skills/tree/06edb1497c5b033eebfbb59d2196f77e3900d0be

It would be most helpful if you could paste the full stack trace of the error message!

Edit: Apologies for the confusion. We've identified some lines in the source to update accounting for the refactored ojd_daps_skills, please follow Liz's suggestion, or use the above commit version for ojd_daps_skills.

lizgzil commented 2 weeks ago

Thanks for flagging this @NTHB-BFSU !

It is likely to be because we recently did a big refactor of the ojd_daps_skills library and it no longer has a pipeline folder.

I suggest you pip install a pre-refactor version of ojd_daps_skills, e.g. perhaps try pip install git+https://github.com/nestauk/ojd_daps_skills/tree/06edb1497c5b033eebfbb59d2196f77e3900d0be

As @sqr00t says, if this doesn't work - do let us know the full stack trace message.