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

No value ? #65

Open
H3134 opened this issue Oct 9, 2019 · 0 comments
Open

No value ? #65

H3134 opened this issue Oct 9, 2019 · 0 comments

Comments

@H3134
Copy link

H3134 commented Oct 9, 2019

def find_deal_ids(self, data, start, stop):

    # find all deals that were *added* after the start time and before the stop time
    added_ids = [data[i]['id'] for i in range(len(data)) if (start <= pendulum.parse(data[i]['add_time']) < stop)]

    # find all deals that a) had a stage change at any time (i.e., the stage_change_time is not None),
    #                     b) had a stage change after the start time and before the stop time, and
    #                     c) are not in added_ids
    changed_ids = [data[i]['id']
                   for i in range(len(data))
                   if (data[i]['id'] not in added_ids)
                   and (data[i]['stage_change_time'] is not None
                        and start <= pendulum.parse(data[i]['stage_change_time']) < stop)]
    return added_ids + changed_ids

this function keeps returning None and i cant track why this is happening..

this error keeps showing when i try to run it:

CRITICAL argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "/home/henrique/tap-pipedrive/venv/bin/tap-pipedrive", line 11, in
load_entry_point('tap-pipedrive==1.0.4', 'console_scripts', 'tap-pipedrive')()
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/tap_pipedrive-1.0.4-py3.6.egg/tap_pipedrive/cli.py", line 34, in main
raise e
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/tap_pipedrive-1.0.4-py3.6.egg/tap_pipedrive/cli.py", line 31, in main
main_impl()
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/tap_pipedrive-1.0.4-py3.6.egg/tap_pipedrive/cli.py", line 26, in main_impl
pipedrive_tap.do_sync(catalog)
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/tap_pipedrive-1.0.4-py3.6.egg/tap_pipedrive/tap.py", line 124, in do_sync
for deal_id in stream.get_deal_ids(self):
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/tap_pipedrive-1.0.4-py3.6.egg/tap_pipedrive/stream.py", line 164, in get_deal_ids
this_page_ids = self.find_deal_ids(response.json()['data'], start=checkpoint, stop=self.stream_start)
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/tap_pipedrive-1.0.4-py3.6.egg/tap_pipedrive/stream.py", line 174, in find_deal_ids
added_ids = [data[i]['id'] for i in range(len(data)) if (start <= pendulum.parse(data[i]['add_time']) < stop)]
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/tap_pipedrive-1.0.4-py3.6.egg/tap_pipedrive/stream.py", line 174, in
added_ids = [data[i]['id'] for i in range(len(data)) if (start <= pendulum.parse(data[i]['add_time']) < stop)]
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/pendulum-2.0.4-py3.6-linux-x86_64.egg/pendulum/parser.py", line 20, in parse
return _parse(text, **options)
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/pendulum-2.0.4-py3.6-linux-x86_64.egg/pendulum/parser.py", line 36, in _parse
parsed = base_parse(text, **options)
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/pendulum-2.0.4-py3.6-linux-x86_64.egg/pendulum/parsing/init.py", line 70, in parse
return _normalize(_parse(text, **_options), **_options)
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/pendulum-2.0.4-py3.6-linux-x86_64.egg/pendulum/parsing/init.py", line 111, in _parse
return _parse_iso8601_interval(text)
File "/home/henrique/tap-pipedrive/venv/lib/python3.6/site-packages/pendulum-2.0.4-py3.6-linux-x86_64.egg/pendulum/parsing/init.py", line 212, in _parse_iso8601_interval
if "/" not in text:
TypeError: argument of type 'NoneType' is not iterable

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