Aspose-cells Python via Java Workbook _init__() takes exactly one argument

We are encountering an Exception loading an existing XLSX file into a Workbook. We are following the guidance on this page Different Ways to Open Files|Documentation (](Different Ways to Open Files|Documentation)
from java_client import java_client # starting java, not relevant for this question
from jpype import java
import jpype
import asposecells
from asposecells.api import *
fis =“template.xlsx”) # Error raised - below“file read”)
workbook = Workbook(fis)

Exception: TypeError: object.init() takes exactly one argument (the instance to initialize)

line 47, in test_function workbook = Workbook(fis) File “/home/site/wwwroot/.python_packages/lib/site-packages/asposecells/”, line 2992, in init super(Workbook, self).init(*args)

Platform: Debian
Python 3.9


Which version of the API (Aspose.Cells for Python via Java) you are using? Also, provide complete environment details. Does the issue occur only with specific Excel file or for all Excel files?


  • aspose-cells-20.2.0
  • install-jdk-0.3.0
  • jpype1-1.4.1
  • packaging-23.0


workbook = Workbook(fis) File “/home/site/wwwroot/.python_packages/lib/site-packages/asposecells/”, line 2992, in init super(Workbook, self).init(*args)

Would you like to test again with Aspose-cells Python via Java 23.1? We can get the right result. The following is the test code, please check.

import jpype
from jpype import java
import asposecells
from asposecells.api import Workbook, SaveFormat
fis =“template_simple.xlsx”)
workbook = Workbook(fis)“template_simple_out.xlsx”)

I think the exception may have something to do with the java_client you use. Aspose.Cells for Python via Java only supports Jdk1.8 or higher, please refer to Getting Started|Documentation