[GH-ISSUE #279] Analytics stopped working #693

Open
opened 2026-03-13 22:22:27 +03:00 by kerem · 0 comments
Owner

Originally created by @fp231 on GitHub (Mar 2, 2021).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/279

Hi, i get the following error when trying to use analytics.py:

--
python3 analytics.py --account *accountname
Traceback (most recent call last):
File "analytics.py", line 216, in
main()
File "analytics.py", line 31, in main
plot_followers_growth(sessions_week, pdf, username, Period.LAST_WEEK)
File "analytics.py", line 126, in plot_followers_growth
pdf.savefig()
File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_pdf.py", line 2507, in savefig
figure.savefig(self, format="pdf", **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 2094, in savefig
self.canvas.print_figure(fname, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/backend_bases.py", line 2075, in print_figure
**kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_pdf.py", line 2565, in print_pdf
self.figure.draw(renderer)
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 1649, in draw
renderer, self, artists, self.suppressComposite)
File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/axes/_base.py", line 2628, in draw
mimage._draw_list_compositing_images(renderer, self, artists)
File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 1185, in draw
ticks_to_draw = self._update_ticks(renderer)
File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 1023, in _update_ticks
tick_tups = list(self.iter_ticks()) # iter_ticks calls the locator
File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 971, in iter_ticks
for i, val in enumerate(majorLocs)]
File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 971, in
for i, val in enumerate(majorLocs)]
File "/usr/lib/python3/dist-packages/matplotlib/dates.py", line 610, in call
return num2date(x, self.tz).strftime(self.fmt)
File "/usr/lib/python3/dist-packages/matplotlib/dates.py", line 498, in num2date
return _from_ordinalf(x, tz)
File "/usr/lib/python3/dist-packages/matplotlib/dates.py", line 296, in _from_ordinalf
'expects datetime objects.'.format(ix))
ValueError: Cannot convert -1 to a date. This often happens if non-datetime values are passed to an axis that expects datetime objects.

Anyone having the same problem?

Best regards,
Fabian

Originally created by @fp231 on GitHub (Mar 2, 2021). Original GitHub issue: https://github.com/alexal1/Insomniac/issues/279 Hi, i get the following error when trying to use analytics.py: -- python3 analytics.py --account *accountname Traceback (most recent call last): File "analytics.py", line 216, in <module> main() File "analytics.py", line 31, in main plot_followers_growth(sessions_week, pdf, username, Period.LAST_WEEK) File "analytics.py", line 126, in plot_followers_growth pdf.savefig() File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_pdf.py", line 2507, in savefig figure.savefig(self, format="pdf", **kwargs) File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 2094, in savefig self.canvas.print_figure(fname, **kwargs) File "/usr/lib/python3/dist-packages/matplotlib/backend_bases.py", line 2075, in print_figure **kwargs) File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_pdf.py", line 2565, in print_pdf self.figure.draw(renderer) File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 1649, in draw renderer, self, artists, self.suppressComposite) File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images a.draw(renderer) File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/usr/lib/python3/dist-packages/matplotlib/axes/_base.py", line 2628, in draw mimage._draw_list_compositing_images(renderer, self, artists) File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images a.draw(renderer) File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper return draw(artist, renderer, *args, **kwargs) File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 1185, in draw ticks_to_draw = self._update_ticks(renderer) File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 1023, in _update_ticks tick_tups = list(self.iter_ticks()) # iter_ticks calls the locator File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 971, in iter_ticks for i, val in enumerate(majorLocs)] File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 971, in <listcomp> for i, val in enumerate(majorLocs)] File "/usr/lib/python3/dist-packages/matplotlib/dates.py", line 610, in __call__ return num2date(x, self.tz).strftime(self.fmt) File "/usr/lib/python3/dist-packages/matplotlib/dates.py", line 498, in num2date return _from_ordinalf(x, tz) File "/usr/lib/python3/dist-packages/matplotlib/dates.py", line 296, in _from_ordinalf 'expects datetime objects.'.format(ix)) ValueError: Cannot convert -1 to a date. This often happens if non-datetime values are passed to an axis that expects datetime objects. -- Anyone having the same problem? Best regards, Fabian
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Insomniac#693
No description provided.