Libc++abi: terminating due to uncaught exception of type HostException: coreclr_initialize failed - status:0x80004005

Hi, I use a Macbook PRO M2 to work and I’m having issues running python3 demo.py on MacOS Sonoma 14.2.1. I’m getting this error:

libc++abi: terminating due to uncaught exception of type HostException: coreclr_initialize failed - status:0x80004005

code is

import aspose.words as aw

# Create a blank document.
doc = aw.Document()

# Use a document builder to add content to the document.
builder = aw.DocumentBuilder(doc)
# Write a new paragraph in the document with the text "Hello World!".
builder.writeln("Hello, World!")

# Save the document in DOCX format. Save format is automatically determined from the file extension.
doc.save("output.docx")

# Test Conversion
doc = aw.Document("output.docx")
doc.save("output.pdf")

1 Like

@festinalente We will investigate the issue and get back to you soon.

@festinalente,
please open a terminal and follow these steps:

  1. sw_vers
  2. python --version, if not working, use python3 -- version
  3. If you have the dotnet installed:
    a. dotnet --version
    b. dotnet -- info

After that, please take a screenshot and attache it here.

HI Even i am facing the same issue on Mac with M1. Please can you help us on this ?

@shruthi_annappa Could you please provide full stack trace of the exception here for our reference? Also, please provide brew list and dotnet --info outputs. Unfortunately, currently it is not clear what causes the problem.

HI Alexey,
Please find the details below

I have just done an import and get the error when i try to run a simple program.

@shruthi_annappa Thank you for additional information. As I can see you are using Aspose.Email, not Aspose.Words. Do you have only Aspose.Email package installed on your side? Could you please try to uninstall all Aspose for Python products and install only one of them (Aspose.Words or Aspose.Email) for testing? Is the problem still reproducible if only one Aspose product is installed?

@shruthi_annappa @festinalente Could you please try running the code outside venv? Is the problem reproducible in this case? What IDE do you use for testing?
Also, please provide us configuration of your venv, for this run the following command in your venv:

pip freeze > requirements.txt.