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: can't subtract offset-naive and offset-aware datetimes #57

Open
Zapata opened this issue Jun 12, 2018 · 0 comments
Open

TypeError: can't subtract offset-naive and offset-aware datetimes #57

Zapata opened this issue Jun 12, 2018 · 0 comments

Comments

@Zapata
Copy link

Zapata commented Jun 12, 2018

Script fails with the below error whatever configuration is used:

Traceback (most recent call last):
  File "cli.py", line 5, in <module>
    cli.main()
  File "/home/zapata/.local/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/zapata/.local/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/mnt/d/Projects/bitshares/bitshares-pricefeed/bitshares_pricefeed/ui.py", line 20, in new_func
    return ctx.invoke(f, *args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/uptick/decorators.py", line 50, in new_func
    return ctx.invoke(f, *args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/uptick/decorators.py", line 77, in new_func
    return ctx.invoke(f, *args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/uptick/decorators.py", line 98, in new_func
    return ctx.invoke(f, *args, **kwargs)
  File "/home/zapata/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/mnt/d/Projects/bitshares/bitshares-pricefeed/bitshares_pricefeed/cli.py", line 162, in update
    feed.derive(assets)
  File "/mnt/d/Projects/bitshares/bitshares-pricefeed/bitshares_pricefeed/pricefeed.py", line 496, in derive
    self.obtain_flags(symbol)
  File "/mnt/d/Projects/bitshares/bitshares-pricefeed/bitshares_pricefeed/pricefeed.py", line 101, in obtain_flags
    if (datetime.utcnow() - feed_age).total_seconds() > self.assetconf(symbol, "maxage"):
TypeError: can't subtract offset-naive and offset-aware datetimes

This seems to be caused by an update in python-bitshares: bitshares/python-bitshares@85eca5f

Zapata added a commit to Zapata/bitshares-pricefeed that referenced this issue Jun 12, 2018
Zapata added a commit to Zapata/bitshares-pricefeed that referenced this issue Aug 17, 2018
Zapata added a commit to Zapata/bitshares-pricefeed that referenced this issue Aug 20, 2018
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

1 participant