Data export: `TypeError: Invalid value 'False' for dtype 'float64'`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in patzilla/navigator/export.py at prepare_dataframes() and inspect the df_documents['dismiss'].fillna(value=False, inplace=True) call shown in the traceback. Reproduce the export failure with the affected data and check how the dismiss column is represented before the fill. The issue is done when exporting the project to CSV and Workbook files no longer raises this dtype error.
Written by the indexing model from the issue text.
Description
Problem
When exporting a project into CSV or Workbook files, we can observe an 500 Internal Server Error, because the application bailed out.
Details
2026-10-26 17:48:39,524 ERROR [patzilla.navigator.services.util ][waitress-3] Exporting format "xlsx" failed.. Exception:
Traceback (most recent call last):
File "/path/to/site-packages/pandas/core/internals/blocks.py", line 1175, in putmask
casted = np_can_hold_element(values.dtype, new)
File "/path/to/site-packages/pandas/core/dtypes/cast.py", line 1792, in np_can_hold_element
raise LossySetitemError
pandas.errors.LossySetitemError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/path/to/patzilla/patzilla/navigator/services/util.py", line 306, in export_util_handler
payload = DossierXlsx(data).create()
~~~~~~~~~~~^^^^^^
File "/path/to/patzilla/patzilla/navigator/export.py", line 474, in __init__
super(DossierXlsx, self).__init__(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/path/to/patzilla/patzilla/navigator/export.py", line 55, in __init__
self.prepare_dataframes()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/path/to/patzilla/patzilla/navigator/export.py", line 113, in prepare_dataframes
self.df_documents['dismiss'].fillna(value=False, inplace=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/site-packages/pandas/core/generic.py", line 7074, in fillna
new_data = self._mgr.fillna(value=value, limit=limit, inplace=inplace)
File "/path/to/site-packages/pandas/core/internals/managers.py", line 461, in fillna
return self.apply(
~~~~~~~~~~^
"fillna",
^^^^^^^^^
...<2 lines>...
inplace=inplace,
^^^^^^^^^^^^^^^^
)
^
File "/path/to/site-packages/pandas/core/internals/managers.py", line 445, in apply
applied = getattr(b, f)(**kwargs)
File "/path/to/site-packages/pandas/core/internals/blocks.py", line 1342, in fillna
nbs = self.putmask(mask.T, value)
File "/path/to/site-packages/pandas/core/internals/blocks.py", line 1188, in putmask
return self.coerce_to_target_dtype(
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
new, raise_on_upcast=True
^^^^^^^^^^^^^^^^^^^^^^^^^
).putmask(mask, new)
^
File "/path/to/site-packages/pandas/core/internals/blocks.py", line 468, in coerce_to_target_dtype
raise TypeError(f"Invalid value '{other}' for dtype '{self.values.dtype}'")
TypeError: Invalid value 'False' for dtype 'float64'
- Dominant language
- Python
- Stars
- 123
- Forks
- 31
- Avg merge
- 1h 9m
- Merged PRs (30d)
- 47
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ip-tools/patzilla
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ip-tools/patzilla#139 · 1 comment ·
Maintainers usually reply within 1 day
-
UI: Update BabelOpendependencies help wanted javascript
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
dependencies help wanted javascript
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
dependencies javascript
Difficulty 3/5 1-2 days Newbie friendliness 66/100
ip-tools/patzilla#125 · 1 comment ·
Maintainers usually reply within 1 day
All issues in ip-tools/patzilla
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
ocr_data_to_elements() raises AttributeError when a layout element is a ListPossibly taken @Eapp1e claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Unstructured-IO/unstructured#4616 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
area:codegen backend:metal bug direction:output
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day