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

AttributeError: type object 'type' has no attribute 'now' #205

Open
chahank opened this issue Dec 8, 2020 · 3 comments
Open

AttributeError: type object 'type' has no attribute 'now' #205

chahank opened this issue Dec 8, 2020 · 3 comments

Comments

@chahank
Copy link

chahank commented Dec 8, 2020

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'
@vifactor
Copy link
Owner

vifactor commented Dec 9, 2020

I would suggest to try python 3.8, because anyway according to issue #198 v.3.9 does not work.

@chahank
Copy link
Author

chahank commented Dec 10, 2020

Thanks, with python 3.8.5 it worked!

@pulkomandy
Copy link
Contributor

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 1906cb6), 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants