[Python] I am working on a system to generate resumes and I am getting a Python error I don't...

Discussão em 'Python' iniciado por Stack, Junho 11, 2025.

  1. Stack

    Stack Membro Participativo

    python python1315.py
    * Serving Flask app 'python1315'
    * Debug mode: on
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
    * Running on http://127.0.0.1:5000
    Press CTRL+C to quit
    * Restarting with stat
    * Debugger is active!
    * Debugger PIN: 133-296-482
    filename= markmc-Gleantech-Jun10.pdf
    127.0.0.1 - - [11/Jun/2025 13:20:16] "POST / HTTP/1.1" 500 -
    Traceback (most recent call last):
    File "/Users/markmcwiggins/venv311.jun11/lib/python3.11/site-packages/flask/app.py", line 1536, in __call__
    return self.wsgi_app(environ, start_response)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/markmcwiggins/venv311.jun11/lib/python3.11/site-packages/flask/app.py", line 1514, in wsgi_app
    response = self.handle_exception(e)
    ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/markmcwiggins/venv311.jun11/lib/python3.11/site-packages/flask/app.py", line 1511, in wsgi_app
    response = self.full_dispatch_request()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/markmcwiggins/venv311.jun11/lib/python3.11/site-packages/flask/app.py", line 919, in full_dispatch_request
    rv = self.handle_user_exception(e)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/markmcwiggins/venv311.jun11/lib/python3.11/site-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
    ^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/markmcwiggins/venv311.jun11/lib/python3.11/site-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/markmcwiggins/codeagain/python1315.py", line 82, in index
    text = extract_text_from_pdf(os.path.join('uploads', filename))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/markmcwiggins/codeagain/python1315.py", line 12, in extract_text_from_pdf
    pdf_reader = PyPDF2.PdfFileReader(pdf_file_obj)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/markmcwiggins/venv311.jun11/lib/python3.11/site-packages/PyPDF2/_reader.py", line 1974, in __init__
    deprecation_with_replacement("PdfFileReader", "PdfReader", "3.0.0")
    File "/Users/markmcwiggins/venv311.jun11/lib/python3.11/site-packages/PyPDF2/_utils.py", line 369, in deprecation_with_replacement
    deprecation(DEPR_MSG_HAPPENED.format(old_name, removed_in, new_name))
    File "/Users/markmcwiggins/venv311.jun11/lib/python3.11/site-packages/PyPDF2/_utils.py", line 351, in deprecation
    raise DeprecationError(msg)
    PyPDF2.errors.DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.
    127.0.0.1 - - [11/Jun/2025 13:20:16] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 304 -
    127.0.0.1 - - [11/Jun/2025 13:20:16] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 -
    127.0.0.1 - - [11/Jun/2025 13:20:17] "GET /?__debugger__=yes&cmd=resource&f=console.png&s=eYCssiH8dmKfIQoYnSu7 HTTP/1.1" 200 -
    127.0.0.1 - - [11/Jun/2025 13:20:17] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 304 -


    Does anyone have any info on this? I am working on a resume builder trying to get this system to generate LaTeX from an existing resume.

    Continue reading...

Compartilhe esta Página