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

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

Closed
crocket opened this issue Mar 4, 2021 · 7 comments
Closed

Comments

@crocket
Copy link

crocket commented Mar 4, 2021

When I start watson, I see this error.
Version: 560e962

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.8/watson", line 33, in <module>
    sys.exit(load_entry_point('td-watson==1.10.0', 'console_scripts', 'watson')())
  File "/usr/lib/python-exec/python3.8/watson", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.8/site-packages/watson/__main__.py", line 1, in <module>
    from watson import cli
  File "/usr/lib/python3.8/site-packages/watson/cli.py", line 439, in <module>
    _SHORTCUT_OPTIONS_VALUES = {
  File "/usr/lib/python3.8/site-packages/watson/cli.py", line 440, in <dictcomp>
    k: get_start_time_for_period(k) for k in _SHORTCUT_OPTIONS
  File "/usr/lib/python3.8/site-packages/watson/utils.py", line 177, in get_start_time_for_period
    start_time = get_last_full_moon(now)
  File "/usr/lib/python3.8/site-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'
@jmaupetit
Copy link
Contributor

jmaupetit commented Mar 4, 2021

I think it's related to the latest arrow lib major upgrade. This should have been fixed in #408. I invite you to reiterate your test with an up-to-date master branch.

Closing this, do not hesitate to re-open it if you consider this issue has not been resolved.

@veganjay
Copy link
Contributor

veganjay commented Mar 4, 2021

Agreed - this is due to the upgrade to arrow 1.0.0 and is fixed in #408.

@veganjay
Copy link
Contributor

veganjay commented Mar 5, 2021

Just to double-check, I tested in a fresh environment using the master branch and it is working:

$ docker run -it --rm python:latest /bin/bash
root@ac446446a9bc:/# git clone https://github.com/TailorDev/Watson
...
root@ac446446a9bc:/# cd Watson
root@ac446446a9bc:/Watson# pip install .
...
root@ac446446a9bc:/Watson# watson status
No project started.
root@ac446446a9bc:/Watson# watson start testing123
Starting project testing123 at 12:53
root@ac446446a9bc:/Watson# watson stop
Stopping project testing123, started just now and stopped just now. (id: 58f57a6)

If you are still having issues, make sure you have the latest version of arrow.

@jmaupetit
Copy link
Contributor

📢 The new 2.0.0 release including this fix is out! https://pypi.org/project/td-watson/2.0.0/ 🔥

@vsdaan
Copy link

vsdaan commented Nov 5, 2022

Installing Watson via apt still produces this error.

@jmaupetit
Copy link
Contributor

Which version did you install via apt?

@vsdaan
Copy link

vsdaan commented Nov 8, 2022

1.8.0-0.1
I did not choose to specifically install that one, apt automatically choose that one.

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

No branches or pull requests

4 participants