8000 Mail URL Collector: Missing requests import for requests.exceptions.Timeout · Issue #2555 · certtools/intelmq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Mail URL Collector: Missing requests import for requests.exceptions.Timeout #2555

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

Closed
sebix opened this issue Jan 27, 2025 · 0 comments · Fixed by #2556
Closed

Mail URL Collector: Missing requests import for requests.exceptions.Timeout #2555

sebix opened this issue Jan 27, 2025 · 0 comments · Fixed by #2556
Labels
bug Indicates an unexpected problem or unintended behavior component: bots

Comments

@sebix
Copy link
Member
sebix commented Jan 27, 2025
2025-01-27 10:09:45,136 - shadowserver-accessible-imap-collector - INFO - Downloading report from 'https://dl.shadowserver.org/XXxX'.
2025-01-27 10:10:26,445 - shadowserver-accessible-imap-collector - INFO - Received SIGTERM.
2025-01-27 10:10:26,445 - shadowserver-accessible-imap-collector - INFO - Processed 2 messages since last logging.
2025-01-27 10:10:26,447 - shadowserver-accessible-imap-collector - INFO - Bot stopped.
2025-01-27 10:10:26,460 - shadowserver-accessible-imap-collector - ERROR - Bot has found a problem.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/intelmq/bots/collectors/mail/collector_mail_url.py", line 52, in process_message
    resp = self.http_get(url)
  File "/usr/lib/python3/dist-packages/intelmq/lib/mixins/http.py", line 103, in http_get
    return self.__session.get(url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 557, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 544, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 699, in send
    r.content
  File "/usr/lib/python3/dist-packages/requests/models.py", line 831, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/usr/lib/python3/dist-packages/requests/models.py", line 753, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/usr/lib/python3/dist-packages/urllib3/response.py", line 572, in stream
    for line in self.read_chunked(amt, decode_content=decode_content):
  File "/usr/lib/python3/dist-packages/urllib3/response.py", line 767, in read_chunked
    chunk = self._handle_chunk(amt)
  File "/usr/lib/python3/dist-packages/urllib3/response.py", line 721, in _handle_chunk
    self._fp._safe_read(2)  # Toss the CRLF at the end of the chunk.
  File "/usr/lib/python3.10/http/client.py", line 631, in _safe_read
    data = self.fp.read(amt)
  File "/usr/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.10/ssl.py", line 1303, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.10/ssl.py", line 1159, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 287, in __handle_sigterm_signal
    self.stop(exitcode=0)
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 599, in stop
    sys.exit(exitcode)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 363, in start
    self.process()
  File "/usr/lib/python3/dist-packages/intelmq/bots/collectors/mail/_lib.py", line 75, in process
    if self.process_message(uid, message):
  File "/usr/lib/python3/dist-packages/intelmq/bots/collectors/mail/collector_mail_url.py", line 53, in process_message
    except requests.exceptions.Timeout:
NameError: name 'requests' is not defined
@sebix sebix added bug Indicates an unexpected problem or unintended behavior component: bots labels Jan 27, 2025
@sebix sebix added this to the 3.3.2 Bugfix release milestone Jan 27, 2025
sebix added a commit to sebix/intelmq that referenced this issue Jan 27, 2025
sebix added a commit to sebix/intelmq that referenced this issue Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: bots
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0