repostat
repostat copied to clipboard
AttributeError: type object 'type' has no attribute 'now'
I got the error below after executing repostat ./git_repo ./gitstat_output
, is there a simple solution? Thank!
File "/Users/ck/opt/anaconda3/envs/git_stats/lib/python3.9/site-packages/analysis/repostat.py", line 52, in main
report.create(output_path)
File "/Users/ck/opt/anaconda3/envs/git_stats/lib/python3.9/site-packages/report/htmlreportcreator.py", line 140, in create
self.make_activity_page(),
File "/Users/ck/opt/anaconda3/envs/git_stats/lib/python3.9/site-packages/report/htmlreportcreator.py", line 202, in make_activity_page
page.add_plot(self.make_activity_plot())
File "/Users/ck/opt/anaconda3/envs/git_stats/lib/python3.9/site-packages/report/htmlreportcreator.py", line 207, in make_activity_plot
recent_activity = self._get_recent_activity_data()
File "/Users/ck/opt/anaconda3/envs/git_stats/lib/python3.9/site-packages/report/htmlreportcreator.py", line 83, in _get_recent_activity_data
recent_weekly_commits = self.git_repository_statistics.\
File "/Users/ckr/opt/anaconda3/envs/git_stats/lib/python3.9/site-packages/analysis/gitrepository.py", line 152, in get_recent_weekly_activity
today = pd.Timestamp.today()
File "pandas/_libs/tslibs/timestamps.pyx", line 294, in pandas._libs.tslibs.timestamps.Timestamp.today
AttributeError: type object 'type' has no attribute 'now'
I would suggest to try python 3.8, because anyway according to issue https://github.com/vifactor/repostat/issues/198 v.3.9 does not work.
Thanks, with python 3.8.5 it worked!
According to https://stackoverflow.com/questions/66112913/pandas-to-datetimetoday-throwing-error the issue is fixed in Pandas 1.1.3. Currently repostat uses 1.3.3 (since 1906cb61f3b447be4fd23d7e3d046284564d17c3), so it should be fine now?
If that's the case, this issue can be closed and the warning about Python 3.9 removed from the readme.