Proxy error(ArgumentNullException): Value cannot be null. (Parameter 'key')

Hi there!
I´m using aspose pdf to create a pdf and sending by email. The thing is my code works on local but when I deploy it I get the next error:
Proxy error(ArgumentNullException): Value cannot be null. (Parameter ‘key’) in document.save(final_path)
I have check it several time and there´s no null argument.
My code is really basic:

    with tempfile.NamedTemporaryFile(delete=False, suffix=".pdf") as temp_file:

        final_path = temp_file.name


    document = ap.Document()

    page = document.pages.add()

    text_fragment = ap.text.TextFragment(f"""
info

    """)

    page.paragraphs.add(text_fragment)

    document.save(final_path)

    return final_path

Please, someone can help me?
Greetings!

@tonirindus

Can you please make sure that the pip version is same that is installed on your server and local machine? Also, please make sure that you are using the API with a valid license and license is present on the server as well. The final_path variable should also have a directory or path which is accessible by the application. In case issue still persists, please let us know.

Thank you for the answer! Version is the same and the applicacion has access to the path. How can I verify that in the server is present a valid license ?

@tonirindus

Aren’t you using the API with a valid or 30-days free temporary license? We suggest you use it and let us know in case issue still persist.