Free Support Forum -

Cannot get license to work


Because of the memory leak I’m facing with RJB and Aspose in Ruby I’m trying again in python.
I have an issue with setting the licence.
I tried with :

licenseStr = "lib/aspose/license.lic"
licensePath ="lib/aspose/license.lic")
licenseStream ="lib/aspose/license.lic")

asposeLicense = jpype.JClass('com.aspose.slides.License')

Also tried with asposeLicense.setLicense(licenceStream) or asposeLicense.setLicense(licencePath)

But I’m getting this type of error :

TypeError: No matching overloads found for com.aspose.slides.License.setLicense(java.lang.String), options are:
	public void com.aspose.slides.License.setLicense(java.lang.String) throws com.aspose.slides.AsposeLicenseException
	public void com.aspose.slides.License.setLicense( throws com.aspose.slides.AsposeLicenseException

This is very confusing as it seems to get what it’s expecting.
I’m using Python 3.7 and am not ready to downgrade to 2.7

So my question : how do I set the license ?



You may please try using following:

asposeLicense = jpype.JClass('com.aspose.slides.License')()

instead of

asposeLicense = jpype.JClass('com.aspose.slides.License')

Perfect thanks