Giter VIP home page Giter VIP logo

Comments (8)

chen0040 avatar chen0040 commented on August 15, 2024

@Ali-Dalal thanks for reporting the issue, i have fixed the issue, pls try again

from keras-english-resume-parser-and-analyzer.

Ali-Dalal avatar Ali-Dalal commented on August 15, 2024

@chen0040 Thanks for the replay

I successfully run the code when I parsed docx document

but when I attemp to parse pdf I get this error

Traceback (most recent call last):
  File "/Users/allloush/Documents/Python/keras-english-resume-parser-and-analyzer/demo/rule_base_parser.py", line 26, in <module>
    main()
  File "/Users/allloush/Documents/Python/keras-english-resume-parser-and-analyzer/demo/rule_base_parser.py", line 8, in main
    collected = read_pdf_and_docx(data_dir_path, command_logging=True)
  File "/Users/allloush/Documents/Python/keras-english-resume-parser-and-analyzer/keras_en_parser_and_analyzer/library/utility/io_utils.py", line 26, in read_pdf_and_docx
A
    read_pdf_and_docx(file_path, collected, command_logging, callback)
  File "/Users/allloush/Documents/Python/keras-english-resume-parser-and-analyzer/keras_en_parser_and_analyzer/library/utility/io_utils.py", line 20, in read_pdf_and_docx
    txt = pdf_to_text(file_path)
  File "/Users/allloush/Documents/Python/keras-english-resume-parser-and-analyzer/keras_en_parser_and_analyzer/library/utility/pdf_utils.py", line 23, in pdf_to_text
    interpreter.process_page(page)
  File "/Users/allloush/Documents/Python/test/venv/lib/python2.7/site-packages/pdfminer/pdfinterp.py", line 833, in process_page
    self.device.end_page(page)
  File "/Users/allloush/Documents/Python/test/venv/lib/python2.7/site-packages/pdfminer/converter.py", line 37, in end_page
    self.receive_layout(self.cur_item)
  File "/Users/allloush/Documents/Python/test/venv/lib/python2.7/site-packages/pdfminer/converter.py", line 172, in receive_layout
    render(ltpage)
  File "/Users/allloush/Documents/Python/test/venv/lib/python2.7/site-packages/pdfminer/converter.py", line 162, in render
    render(child)
  File "/Users/allloush/Documents/Python/test/venv/lib/python2.7/site-packages/pdfminer/converter.py", line 162, in render
    render(child)
  File "/Users/allloush/Documents/Python/test/venv/lib/python2.7/site-packages/pdfminer/converter.py", line 162, in render
    render(child)
  File "/Users/allloush/Documents/Python/test/venv/lib/python2.7/site-packages/pdfminer/converter.py", line 164, in render
    self.write_text(item.get_text())
  File "/Users/allloush/Documents/Python/test/venv/lib/python2.7/site-packages/pdfminer/converter.py", line 155, in write_text
    self.outfp.write(text.encode(self.codec, 'ignore'))
TypeError: unicode argument expected, got 'str'

any help pls?

I also tried to find out what the problem. but not luck :(

from keras-english-resume-parser-and-analyzer.

chen0040 avatar chen0040 commented on August 15, 2024

@Ali-Dalal the error comes from pdfminer trying to parse your pdf file, as pdfminer is an external dependency to this project. it is possible that pdfminer cannot process the pdf file you have. As i don't have your pdf file, so i am not sure what actually happen. if you like me to help debugging, you can share the pdf file u used for testing

from keras-english-resume-parser-and-analyzer.

Ali-Dalal avatar Ali-Dalal commented on August 15, 2024

@chen0040 Yeah true

another thing

If I try to run another script (dl_based_parser_train.py)

I am getting this error

Traceback (most recent call last):
  File "/Users/allloush/Documents/Python/keras-english-resume-parser-and-analyzer/demo/dl_based_parser_train.py", line 3, in <module>
    from keras_en_parser_and_analyzer.library.dl_based_parser import ResumeParser
  File "/Users/allloush/Documents/Python/keras-english-resume-parser-and-analyzer/keras_en_parser_and_analyzer/library/dl_based_parser.py", line 2, in <module>
    from keras_en_parser_and_analyzer.library.classifiers.lstm import WordVecBidirectionalLstmSoftmax
ImportError: No module named classifiers.lstm

any help?

Thanks a lot

from keras-english-resume-parser-and-analyzer.

chen0040 avatar chen0040 commented on August 15, 2024

@Ali-Dalal , if you use pycharm, u should be running fine, but if u run from command line, i was able to reproduce ur issue. I have made some changes to the scripts in the demo folder, now u should be able to run the script from command line.

from keras-english-resume-parser-and-analyzer.

Ali-Dalal avatar Ali-Dalal commented on August 15, 2024

@chen0040

I am running the script from pycharm, I tried again but still the same error No module named classifiers.lstm

does the project depend on python 3 or 2.7?

Also is there any steps to get the project working? (maybe I miss some steps)

Thanks

from keras-english-resume-parser-and-analyzer.

chen0040 avatar chen0040 commented on August 15, 2024

python 3 i was using python 3.5 or 3.6

from keras-english-resume-parser-and-analyzer.

chen0040 avatar chen0040 commented on August 15, 2024

@Ali-Dalal my personal settings is pycharm with the requirements.txt installed and using python 3.6. My computer also has anaconda installed, good to have but i don't think u need that. For the steps, if u are using pycharm just open the project in pycharm, right-click any scripts in the demo folder and select run ...

from keras-english-resume-parser-and-analyzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.