This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Description
Describe the bug
When running with -emt, CSV input, and a date field given in the required format YYYY/MM/DD, it crashes with:
File "/Users/paul/src/pyGrams/scripts/tfidf_reduce.py", line 77, in <listcomp>
[d.isocalendar() for d in dates]]
AttributeError: 'str' object has no attribute 'isocalendar'
The code does not appear to be parsing the input date string as a date object; it attempts to call date methods on a string.
To Reproduce
Steps to reproduce the behavior:
- Create a CSV input file with a date field in YYYY/MM/DD format
- Run
python pygrams.py -emt -ds=posts.csv -dh='date' -th text > emergent.out
- Crashes with above error
Expected behavior
Should not crash; should calculate emerging terms.
Desktop (please complete the following information):