In git project folder I have uploaded poppler-22.04.0 and I am trying to deploy my project on render. I am not able to set environment variable for Path of poppler. I am getting error-
Poppler Path: /opt/render/project/src/.venv/bin:/home/render/.bun/bin:/opt/render/project/nodes/node-20.12.2/bin:/opt/render/project/src/.venv/bin:/opt/render/project/poetry/bin:/home/render/.python-poetry/bin:/usr/local/cargo/bin:/opt/render/project/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
May 27 07:21:39 PMINFO: 58.84.62.6:0 - “POST /uploadfile/ HTTP/1.1” 500 Internal Server Error
May 27 07:21:39 PMERROR: Exception in ASGI application
May 27 07:21:39 PMTraceback (most recent call last):
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/pdf2image/pdf2image.py”, line 581, in pdfinfo_from_path
May 27 07:21:39 PM proc = Popen(command, env=env, stdout=PIPE, stderr=PIPE)
May 27 07:21:39 PM File “/opt/render/project/python/Python-3.10.0/lib/python3.10/subprocess.py”, line 966, in init
May 27 07:21:39 PM self._execute_child(args, executable, preexec_fn, close_fds,
May 27 07:21:39 PM File “/opt/render/project/python/Python-3.10.0/lib/python3.10/subprocess.py”, line 1842, in _execute_child
May 27 07:21:39 PM raise child_exception_type(errno_num, err_msg, err_filename)
May 27 07:21:39 PMFileNotFoundError: [Errno 2] No such file or directory: ‘/opt/render/project/src/.venv/bin:/home/render/.bun/bin:/opt/render/project/nodes/node-20.12.2/bin:/opt/render/project/src/.venv/bin:/opt/render/project/poetry/bin:/home/render/.python-poetry/bin:/usr/local/cargo/bin:/opt/render/project/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin/pdfinfo’
May 27 07:21:39 PM
May 27 07:21:39 PMDuring handling of the above exception, another exception occurred:
May 27 07:21:39 PM
May 27 07:21:39 PMTraceback (most recent call last):
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py”, line 412, in run_asgi
May 27 07:21:39 PM result = await app( # type: ignore[func-returns-value]
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py”, line 84, in call
May 27 07:21:39 PM return await self.app(scope, receive, send)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/fastapi/applications.py”, line 1054, in call
May 27 07:21:39 PM await super().call(scope, receive, send)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/applications.py”, line 123, in call
May 27 07:21:39 PM await self.middleware_stack(scope, receive, send)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py”, line 186, in call
May 27 07:21:39 PM raise exc
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py”, line 164, in call
May 27 07:21:39 PM await self.app(scope, receive, _send)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py”, line 62, in call
May 27 07:21:39 PM await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 64, in wrapped_app
May 27 07:21:39 PM raise exc
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 53, in wrapped_app
May 27 07:21:39 PM await app(scope, receive, sender)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/routing.py”, line 758, in call
May 27 07:21:39 PM await self.middleware_stack(scope, receive, send)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/routing.py”, line 778, in app
May 27 07:21:39 PM await route.handle(scope, receive, send)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/routing.py”, line 299, in handle
May 27 07:21:39 PM await self.app(scope, receive, send)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/routing.py”, line 79, in app
May 27 07:21:39 PM await wrap_app_handling_exceptions(app, request)(scope, receive, send)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 64, in wrapped_app
May 27 07:21:39 PM raise exc
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py”, line 53, in wrapped_app
May 27 07:21:39 PM await app(scope, receive, sender)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/starlette/routing.py”, line 74, in app
May 27 07:21:39 PM response = await func(request)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/fastapi/routing.py”, line 278, in app
May 27 07:21:39 PM raw_response = await run_endpoint_function(
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/fastapi/routing.py”, line 191, in run_endpoint_function
May 27 07:21:39 PM return await dependant.call(**values)
May 27 07:21:39 PM File “/opt/render/project/src/main.py”, line 75, in ocr_inputs_single_file_local_syestem
May 27 07:21:39 PM invoice_index,invoice_categories_dict,invoice_code_dict,invoice_category = ocr.pdf_to_image_conv(output_file_path,uploaded_filename)
May 27 07:21:39 PM File “/opt/render/project/src/service/ocr.py”, line 221, in pdf_to_image_conv
May 27 07:21:39 PM images = convert_from_path(pdf_file_path,500,poppler_path=poppler_dir)
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/pdf2image/pdf2image.py”, line 127, in convert_from_path
May 27 07:21:39 PM page_count = pdfinfo_from_path(
May 27 07:21:39 PM File “/opt/render/project/src/.venv/lib/python3.10/site-packages/pdf2image/pdf2image.py”, line 607, in pdfinfo_from_path
May 27 07:21:39 PM raise PDFInfoNotInstalledError(
May 27 07:21:39 PMpdf2image.exceptions.PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?