fact-project / shifthelper

So we can sleep at night.
4 stars 0 forks source link

exceptions from: sfc.main_page() #260

Open dneise opened 6 years ago

dneise commented 6 years ago
Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/custos/checks/__init__.py", line 82, in wrapped_check
    self.check(*args, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/shifthelper/checks.py", line 38, in check
    if all([f() for f in self.checklist]):
  File "/opt/conda/lib/python3.6/site-packages/shifthelper/checks.py", line 38, in <listcomp>
    if all([f() for f in self.checklist]):
  File "/opt/conda/lib/python3.6/site-packages/shifthelper/debug_log_wrapper.py", line 9, in log_call_and_result
    result = wrapped(*args, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/shifthelper/conditions.py", line 96, in is_data_run
    result = sfc.main_page().system_status
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 212, in call
    raise attempt.get()
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/opt/conda/lib/python3.6/site-packages/six.py", line 686, in reraise
    raise value
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/opt/conda/lib/python3.6/site-packages/shifthelper/retry_smart_fact_crawler.py", line 77, in main_page
    return sfc.main_page(url=url, timeout=timeout, fallback=True)
  File "/opt/conda/lib/python3.6/site-packages/smart_fact_crawler/__init__.py", line 319, in main_page
    trigger_val, trigger_unit, _ = get(table, 5, 1, default='nan nan nan').split()
ValueError: not enough values to unpack (expected 3, got 2)
2018-01-23 04:01:25,700 - custos.checks.FactIntervalCheck - ERROR - Exception while running check
Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/custos/checks/__init__.py", line 82, in wrapped_check
    self.check(*args, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/shifthelper/checks.py", line 38, in check
    if all([f() for f in self.checklist]):
  File "/opt/conda/lib/python3.6/site-packages/shifthelper/checks.py", line 38, in <listcomp>
    if all([f() for f in self.checklist]):
  File "/opt/conda/lib/python3.6/site-packages/shifthelper/debug_log_wrapper.py", line 9, in log_call_and_result
    result = wrapped(*args, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/shifthelper/conditions.py", line 96, in is_data_run
    result = sfc.main_page().system_status
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 212, in call
    raise attempt.get()
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/opt/conda/lib/python3.6/site-packages/six.py", line 686, in reraise
    raise value
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/opt/conda/lib/python3.6/site-packages/shifthelper/retry_smart_fact_crawler.py", line 77, in main_page
    return sfc.main_page(url=url, timeout=timeout, fallback=True)
  File "/opt/conda/lib/python3.6/site-packages/smart_fact_crawler/__init__.py", line 319, in main_page
    trigger_val, trigger_unit, _ = get(table, 5, 1, default='nan nan nan').split()
ValueError: not enough values to unpack (expected 3, got 2)
dneise commented 6 years ago

I thought, I reproduced this issue, but instead of doing:

import smart_fact_crawler as sfc
while True:
    sfc.main_page()

Do see this issue life ... I have to do:

from shifthelper import retry_smart_fact_crawler as sfc
while True:
    sfc.main_page()

Because this is what the SH is doing ... with the first version, I was able to reproduce the issue, but with the latter version not.

So I cannot explain this issue.

dneise commented 6 years ago

I just connected to the container on the infra-1 machine, so check which version of the shifthelper and smart_fact_crawler is installed.

All looks fine to me