Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running package #175

Open
Delmark1904 opened this issue Jan 30, 2023 · 7 comments
Open

Error while running package #175

Delmark1904 opened this issue Jan 30, 2023 · 7 comments

Comments

@Delmark1904
Copy link

I have tried to install ojd_daps_skills with the help of pip (as was mentioned in documentation) in Google Colab and tried to install ojd_daps_skills manually, by cloning full repo and installing all requirements. In all variants - I got next error (maybe someone can help me fix it or identify, what is causing it):
2023-01-30 16:55:25,125 - SkillsExtractor - INFO - Loading the model from a local location (ner_spacy.py:509) 2023-01-30 16:55:25,126 - SkillsExtractor - INFO - Loading the model from D:\work_main\freysoft\CV_parser\parser_main\skills_taxonomy_ontology\repos\ojd_daps_skills\ojd_daps_skills_data/outputs/models/ner_model/20220825/ (ner_spacy.py:512) 2023-01-30 16:55:25,130 - SkillsExtractor - INFO - Model not found locally - you may need to download it from S3 (set s3_download to True) (ner_spacy.py:518) Traceback (most recent call last): File "d:/work_main/freysoft/CV_parser/parser_main/skills_taxonomy_ontology/repos/ojd_daps_skills/test.py", line 5, in <module> es.load() #load necessary models File "d:\work_main\freysoft\CV_parser\parser_main\skills_taxonomy_ontology\repos\ojd_daps_skills\ojd_daps_skills\pipeline\extract_skills\extract_skills.py", line 147, in load self.nlp = self.job_ner.load_model(self.ner_model_path, s3_download=self.s3) File "d:\work_main\freysoft\CV_parser\parser_main\skills_taxonomy_ontology\repos\ojd_daps_skills\ojd_daps_skills\pipeline\skill_ner\ner_spacy.py", line 521, in load_model return self.nlp AttributeError: 'JobNER' object has no attribute 'nlp'

@lizgzil
Copy link
Collaborator

lizgzil commented Jan 30, 2023

Hi @Delmark1904 . Thanks for opening this issue. For now, I can think of two things this might be:

  1. Have you installed the spacy model? python -m spacy download en_core_web_sm
  2. Do you have the aws command line tools installed? https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

I'll have a think about what else it might be if not these! 🤔

@lizgzil
Copy link
Collaborator

lizgzil commented Jan 31, 2023

@Delmark1904 may also be worth installing our beta version as pointed out here #176

@Delmark1904
Copy link
Author

Delmark1904 commented Jan 31, 2023

Hi @Delmark1904 . Thanks for opening this issue....

Hi @lizgzil, thanks for replying. Yes, I have installed en_core_web_sm and loaded AWS command line tools. I am working on Windows and found, that in setup.py all lines, that contain open() should also contain encoding='UTF-8', as far as standard type for Windows is not 'UTF-8' but something else. Also, when I tried loading everything by cloning repo, I needed to unzip "ojd_daps_skills_data.zip" manually and place it to the root directory, that's how I fixed error with AttributeError: 'JobNER' object has no attribute 'nlp'.
After that, I have tried to run example code again and got an error botocore.exceptions.NoCredentialsError: Unable to locate credentials, but after re-installing setup.py - this error disappeared, so now everything works 😃

@matteospinazzola
Copy link

Hi @Delmark1904 , I think I've been facing the same issue. Could I ask you for more details on the solution you found?

What setup.py files did you modify? there aren't in my ojd-daps-skills directory
What was the exact change you made?

Sorry if these are basic questions, but I'm quite new to python.
Thanks for any help!

@india-kerle
Copy link
Collaborator

@matteospinazzola If you'd like to try and manually download the models from the public s3 bucket, the link to the zipped file containing all relevant models and datasets exist here: https://open-jobs-indicators.s3.eu-west-1.amazonaws.com/escoe_extension/ojd_daps_skills_data.zip

You'll need to unzip the file and move it to your relevant path - if you've cloned the repo, it will need to moved to the project’s parent folder - i.e. ojd_daps_skills/

@matteospinazzola
Copy link

matteospinazzola commented May 16, 2023

thanks @india-kerle ! indeed, it was sufficient to manually download the model and follow your instructions, though with one difference: the unzipped file had to be placed next to ojd_daps_skills/ and not within it.
Now everything works fine. I would definitely recommend this workaround over alternative fixes.

@yywang40
Copy link

yywang40 commented Jun 7, 2024

I found that the public data file has been updated to a new version. The current link that worked for me is this one:

https://open-jobs-indicators.s3.amazonaws.com/escoe_extension/ojd_daps_skills_data_new.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants