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

BUG: TypeError: __init__() got an unexpected keyword argument 'rich_text' #6532

Closed
3 tasks done
ght2game opened this issue Sep 5, 2023 · 1 comment · Fixed by #6534
Closed
3 tasks done

BUG: TypeError: __init__() got an unexpected keyword argument 'rich_text' #6532

ght2game opened this issue Sep 5, 2023 · 1 comment · Fixed by #6534
Labels
bug 🦗 Something isn't working P1 Important tasks that we should complete soon

Comments

@ght2game
Copy link

ght2game commented Sep 5, 2023

Modin version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest released version of Modin.

  • I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)

Reproducible Example

import modin.pandas as mpd
import ray
raw_filtered=mpd.read_excel('./filtered_data.xlsx')

Issue Description

I simply read the excel file with modin and get an error.
I recently formatted it, and I use Windows 11.

Expected Behavior

import modin.pandas as mpd
import ray
ray.init(runtime_env={'env_vars': {'MODIN_AUTOIMPORT_PANDAS': '1'}})
raw_filtered=mpd.read_excel('./filtered_data.xlsx')

Error Logs

RayTaskError(TypeError) Traceback (most recent call last)
Cell In[10], line 1
----> 1 raw_filtered=mpd.read_excel('./filtered_data.xlsx')

File ~\anaconda3\envs\fire\lib\site-packages\modin\utils.py:478, in expanduser_path_arg..decorator..wrapped(*args, **kw)
476 elif isinstance(patharg, Path):
477 params.arguments[argname] = patharg.expanduser()
--> 478 return func(*params.args, **params.kwargs)
479 return func(*args, **kw)

File ~\anaconda3\envs\fire\lib\site-packages\modin\logging\logger_decorator.py:128, in enable_logging..decorator..run_and_log(*args, **kwargs)
113 """
114 Compute function with logging if Modin logging is enabled.
115
(...)
125 Any
126 """
127 if LogMode.get() == "disable":
--> 128 return obj(*args, **kwargs)
130 logger = get_logger()
131 logger_level = getattr(logger, log_level)

File ~\anaconda3\envs\fire\lib\site-packages\modin\pandas\io.py:456, in read_excel(io, sheet_name, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, parse_dates, date_parser, date_format, thousands, decimal, comment, skipfooter, storage_options, dtype_backend)
452 _, _, _, kwargs = inspect.getargvalues(inspect.currentframe())
454 from modin.core.execution.dispatching.factories.dispatcher import FactoryDispatcher
--> 456 intermediate = FactoryDispatcher.read_excel(**kwargs)
457 if isinstance(intermediate, (OrderedDict, dict)):
458 parsed = type(intermediate)()

File ~\anaconda3\envs\fire\lib\site-packages\modin\core\execution\dispatching\factories\dispatcher.py:237, in FactoryDispatcher.read_excel(cls, **kwargs)
234 @classmethod
235 @_inherit_docstrings(factories.BaseFactory._read_excel)
236 def read_excel(cls, **kwargs):
--> 237 return cls.get_factory()._read_excel(**kwargs)

File ~\anaconda3\envs\fire\lib\site-packages\modin\core\execution\dispatching\factories\factories.py:273, in BaseFactory._read_excel(cls, **kwargs)
265 @classmethod
266 @doc(
267 _doc_io_method_template,
(...)
271 )
272 def _read_excel(cls, **kwargs):
--> 273 return cls.io_cls.read_excel(**kwargs)

File ~\anaconda3\envs\fire\lib\site-packages\modin\logging\logger_decorator.py:128, in enable_logging..decorator..run_and_log(*args, **kwargs)
113 """
114 Compute function with logging if Modin logging is enabled.
115
(...)
125 Any
126 """
127 if LogMode.get() == "disable":
--> 128 return obj(*args, **kwargs)
130 logger = get_logger()
131 logger_level = getattr(logger, log_level)

File ~\anaconda3\envs\fire\lib\site-packages\modin\core\io\file_dispatcher.py:159, in FileDispatcher.read(cls, *args, **kwargs)
137 """
138 Read data according passed args and kwargs.
139
(...)
156 postprocessing work on the resulting query_compiler object.
157 """
158 try:
--> 159 query_compiler = cls._read(*args, **kwargs)
160 except ModinAssumptionError as err:
161 param_name = "path_or_buf" if "path_or_buf" in kwargs else "fname"

File ~\anaconda3\envs\fire\lib\site-packages\modin\logging\logger_decorator.py:128, in enable_logging..decorator..run_and_log(*args, **kwargs)
113 """
114 Compute function with logging if Modin logging is enabled.
115
(...)
125 Any
126 """
127 if LogMode.get() == "disable":
--> 128 return obj(*args, **kwargs)
130 logger = get_logger()
131 logger_level = getattr(logger, log_level)

File ~\anaconda3\envs\fire\lib\site-packages\modin\core\io\text\excel_dispatcher.py:230, in ExcelDispatcher._read(cls, io, **kwargs)
227 # Compute the index based on a sum of the lengths of each partition (by default)
228 # or based on the column(s) that were requested.
229 if index_col is None:
--> 230 row_lengths = cls.materialize(index_ids)
231 new_index = pandas.RangeIndex(sum(row_lengths))
232 else:

File ~\anaconda3\envs\fire\lib\site-packages\modin\core\execution\ray\common\engine_wrapper.py:92, in RayWrapper.materialize(cls, obj_id)
77 @classmethod
78 def materialize(cls, obj_id):
79 """
80 Get the value of object from the Plasma store.
81
(...)
90 Whatever was identified by obj_id.
91 """
---> 92 return ray.get(obj_id)

File ~\anaconda3\envs\fire\lib\site-packages\ray_private\auto_init_hook.py:24, in wrap_auto_init..auto_init_wrapper(*args, **kwargs)
21 @wraps(fn)
22 def auto_init_wrapper(*args, **kwargs):
23 auto_init_ray()
---> 24 return fn(*args, **kwargs)

File ~\anaconda3\envs\fire\lib\site-packages\ray_private\client_mode_hook.py:103, in client_mode_hook..wrapper(*args, **kwargs)
101 if func.name != "init" or is_client_mode_enabled_by_default:
102 return getattr(ray, func.name)(*args, **kwargs)
--> 103 return func(*args, **kwargs)

File ~\anaconda3\envs\fire\lib\site-packages\ray_private\worker.py:2524, in get(object_refs, timeout)
2522 worker.core_worker.dump_object_store_memory_usage()
2523 if isinstance(value, RayTaskError):
-> 2524 raise value.as_instanceof_cause()
2525 else:
2526 raise value

RayTaskError(TypeError): ray::_deploy_ray_func() (pid=7624, ip=127.0.0.1)
File "python\ray_raylet.pyx", line 1424, in ray._raylet.execute_task
File "C:\Users\ght2g\anaconda3\envs\fire\lib\site-packages\modin\core\execution\ray\common\engine_wrapper.py", line 44, in _deploy_ray_func
return func(*args, **kwargs)
File "C:\Users\ght2g\anaconda3\envs\fire\lib\site-packages\modin\logging\logger_decorator.py", line 128, in run_and_log
return obj(*args, **kwargs)
File "C:\Users\ght2g\anaconda3\envs\fire\lib\site-packages\modin\core\storage_formats\pandas\parsers.py", line 655, in parse
reader = WorksheetReader(*common_args, rich_text=False)
File "openpyxl\worksheet_reader.py", line 342, in openpyxl.worksheet._reader.WorksheetReader.init
TypeError: init() got an unexpected keyword argument 'rich_text'

Installed Versions

INSTALLED VERSIONS

commit : 0f437949513225922d851e9581723d82120684a6
python : 3.10.12.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.22000
machine : AMD64
processor : AMD64 Family 23 Model 49 Stepping 0, AuthenticAMD
byteorder : little
LC_ALL : None
LANG : None
LOCALE : Korean_Korea.949

pandas : 2.0.3
numpy : 1.25.2
pytz : 2022.7
dateutil : 2.8.2
setuptools : 68.0.0
pip : 23.2.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.2
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.12.2
pandas_datareader: None
bs4 : 4.12.2
bottleneck : 1.3.5
brotli :
fastparquet : None
fsspec : 2023.9.0
gcsfs : None
matplotlib : 3.7.2
numba : None
numexpr : 2.8.4
odfpy : None
openpyxl : 3.0.10
pandas_gbq : None
pyarrow : 13.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.11.2
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : 2.2.0
pyqt5 : None

@ght2game ght2game added bug 🦗 Something isn't working Triage 🩹 Issues that need triage labels Sep 5, 2023
anmyachev added a commit to anmyachev/modin that referenced this issue Sep 5, 2023
…_text' param for old 'openpyxl'

Signed-off-by: Anatoly Myachev <[email protected]>
@anmyachev anmyachev added P1 Important tasks that we should complete soon and removed Triage 🩹 Issues that need triage labels Sep 5, 2023
@anmyachev
Copy link
Collaborator

Hi @ght2game! Thanks for the contribution!

anmyachev added a commit to anmyachev/modin that referenced this issue Sep 5, 2023
…_text' param for old 'openpyxl'

Signed-off-by: Anatoly Myachev <[email protected]>
vnlitvinov pushed a commit that referenced this issue Sep 6, 2023
anmyachev added a commit to anmyachev/modin that referenced this issue Oct 30, 2023
…_text' param for old 'openpyxl' (modin-project#6534)

Signed-off-by: Anatoly Myachev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working P1 Important tasks that we should complete soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants