Bug Tracker 
| ID | 290🔗 |
|---|---|
| Date: | 2025-03-09 17:21:55 |
| Last update: | 2025-03-10 15:16:43 |
| Status | Closed (Fixed) |
| Category | datatool |
| Version | 3.0.1 |
| Summary | Package datatool-base Warning |
Sign in to subscribe to notifications about this report.
Description
I was trying to use the new version of the datatool package with an existing file, but I encounter a datatool-base warning that I can't figure out.Probably it's a misconfiguration setting, but when I browse the user guide, I can't find it out.
I managed to reproduce the warning
Package datatool-base Warning: Can't convert `13.5' to decimal: not a number on input line 14.Ulrike Fischer has put a comment in [TeX.SX Link]
MWE
Download (319B)
\documentclass{article}
\begin{filecontents}[noheader,overwrite]{exemplo.csv}
nome,nota
alice,15
bob,12
\end{filecontents}
\usepackage{datatool}
\DTLsetup{store-datum,default-name=exemplo}
\DTLread{exemplo.csv}
\begin{document}
\DTLmeanforkeys{exemplo}{nota}{\medianotas}
\medianotas
\end{document}
Evaluation
I'll investigate. There seems to be something wrong with \DTLmeanforkeys. However, the aggregate action seems to work fine, so you could use that instead:
\DTLaction[options={mean},key=nota]{aggregate}
Count: \DTLuse{}.
Mean: \DTLuse{mean}.
Or get: \DTLget[mean]{\medianotas}\medianotas.
Update: Ulrike is correct that it's an expansion issue. The same occurs for similar commands such as \DTLsumcolumn.
Update: now fixed in v3.1. Please allow a few days for it to reach the TeX distributions.
Comments
1 comment.
Replying to Comment #153:
Add Comment
Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=290

Date: 2025-03-09 17:50:06
Thank you for the prompt evaluation and for the suggestion.