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

terminate called after throwing an instance of 'com::sun::star::container::NoSuchElementException' #59

Open
sendurangr opened this issue Jul 19, 2024 · 0 comments

Comments

@sendurangr
Copy link

sendurangr commented Jul 19, 2024

 terminate called after throwing an instance of 'com::sun::star::container::NoSuchElementException'
0.650 /bin/sh: line 1:     8 Aborted                 /opt/instdir/program/soffice.bin --headless --norestore --invisible --nodefault --nofirststartwizard --nolockcheck --nologo --convert-to pdf:writer_pdf_Export --outdir /tmp /opt/test-doc.docx
------
Dockerfile:29
--------------------
  27 |     # CHECK IF IT WORKS
  28 |     RUN echo "Checking if it works"
  29 | >>> RUN export HOME=/tmp && /opt/instdir/program/soffice.bin --headless --norestore --invisible --nodefault --nofirststartwizard --nolockcheck --nologo --convert-to pdf:writer_pdf_Export --outdir /tmp /opt/test-doc.docx    
  30 |
  31 |     # Copy the Lambda function code
--------------------
ERROR: failed to solve: process "/bin/sh -c export HOME=/tmp && /opt/instdir/program/soffice.bin --headless --norestore --invisible --nodefault --nofirststartwizard --nolockcheck --nologo --convert-to pdf:writer_pdf_Export --outdir /tmp /opt/test-doc.docx" did not complete successfully: exit code: 134
# Use the Amazon Linux 2 base image
FROM public.ecr.aws/lambda/python:3.8

# Install ClamAV and update the virus definitions
RUN yum -y install clamav clamav-update \
    && freshclam

## Upgrade pip and install the required Python packages
RUN python3.8 -m pip install --upgrade pip
COPY requirements.txt ./
RUN python3.8 -m pip install -r requirements.txt

RUN echo "Installing wget, tar"
# Install wget and download lo.tar.gz, then extract it to /tmp
RUN yum -y install wget
RUN yum -y install tar

RUN echo "Permissions for /tmp and /opt"

RUN wget https://github.com/vladholubiev/serverless-libreoffice/releases/download/v6.4.0.1/lo.tar.gz -P /tmp
# get it from opt and put inside /tmp

RUN tar -xvf /tmp/lo.tar.gz -C /opt

COPY test-doc.docx /opt/test-doc.docx

# CHECK IF IT WORKS
RUN echo "Checking if it works"
RUN export HOME=/tmp && /opt/instdir/program/soffice.bin --headless --norestore --invisible --nodefault --nofirststartwizard --nolockcheck --nologo --convert-to pdf:writer_pdf_Export --outdir /tmp /opt/test-doc.docx

# Copy the Lambda function code
COPY app.py ./

# Set the entry point to use the Lambda runtime interface emulator (RIE)
ENTRYPOINT ["python3.8", "-m", "awslambdaric"]
CMD ["app.lambda_handler"]

can anyone help me out on this.

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

No branches or pull requests

1 participant