Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

cif.py - updated arrow.py depreciated plural use for replace, should now use shift #346

Open
erush6861 opened this issue Aug 22, 2019 · 2 comments

Comments

@erush6861
Copy link

2019-08-20T22:45:58 (20065)basepoller._polling_loop INFO: Polling cif_Feed-1566362939368-1566363119009
2019-08-20T22:45:58 (20065)basepoller._poll ERROR: Exception in polling loop for cif_Feed-1566362939368-1566363119009: unknown attribute: "days"
Traceback (most recent call last):
File "/opt/minemeld/engine/core/minemeld/ft/basepoller.py", line 729, in _poll
performed = self._polling_loop()
File "/opt/minemeld/engine/core/minemeld/ft/basepoller.py", line 576, in _polling_loop
iterator = self._build_iterator(now)
File "/opt/minemeld/engine/core/minemeld/ft/cif.py", line 139, in _build_iterator
now.replace(hours=-168).format('YYYY-MM-DDTHH:mm:ss')
File "/opt/minemeld/engine/current/lib/python2.7/site-packages/arrow/arrow.py", line 590, in replace
raise AttributeError('unknown attribute: "{}"'.format(key))
AttributeError: unknown attribute: "days"

arrow-py/arrow@976b6ea
"replace() with plural property to shift value is deprecated, use shift() instead"

line 139:
now.replace(days=-days).format('YYYY-MM-DDTHH:mm:ss')

change to:
now.shift(days=-days).format('YYYY-MM-DDTHH:mm:ss')

@JesseBowling
Copy link

#350 Should solve this issue....

@ckrez
Copy link

ckrez commented Oct 31, 2019

Try this quick workaround in the meantime:

/opt/minemeld/engine/current/bin/pip install arrow==0.14.2

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

No branches or pull requests

3 participants