TailorDev / Watson

:watch: A wonderful CLI to track your time!
http://tailordev.github.io/Watson/
MIT License
2.41k stars 237 forks source link

TypeError: '<' not supported between instances of 'method' and 'int' #464

Closed PrimaMateria closed 2 years ago

PrimaMateria commented 2 years ago
Traceback (most recent call last):
  File "/usr/bin/watson", line 11, in <module>
    load_entry_point('td-watson==1.8.0', 'console_scripts', 'watson')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 479, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2861, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2465, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2471, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/watson/__main__.py", line 2, in <module>
    from watson import cli
  File "/usr/lib/python3/dist-packages/watson/cli.py", line 399, in <module>
    _SHORTCUT_OPTIONS_VALUES = {
  File "/usr/lib/python3/dist-packages/watson/cli.py", line 400, in <dictcomp>
    k: get_start_time_for_period(k) for k in _SHORTCUT_OPTIONS
  File "/usr/lib/python3/dist-packages/watson/utils.py", line 181, in get_start_time_for_period
    start_time = get_last_full_moon(now)
  File "/usr/lib/python3/dist-packages/watson/fullmoon.py", line 226, in get_last_full_moon
    idx = bisect.bisect_right(fullmoons, now)
TypeError: '<' not supported between instances of 'method' and 'int'

Got the issue after recent system apt upgrade.

Package                           Version
--------------------------------- ---------
arrow                             1.2.2
click                             7.1.2
click-didyoumean                  0.3.0
colorama                          0.4.4
requests                          2.25.1
td-watson                         2.0.1
PrimaMateria commented 2 years ago

I was not using td-watson 2.0.1 which was installed by pip, but version 1.8.0 which was installed by apt. After removing apt package and using the latest python package everything works again.

jmaupetit commented 2 years ago

Should be fixed with the 2.1.0 fresh release!