Skip to content

[python3] TypeError raised running sbin/db_updater.py #1

@binaryflesh

Description

@binaryflesh

Steps to reproduce: # cd ~/cve-search-ng/sbin && python db_updater.py

Environment:

  • python3: Python 3.7.5 # python3 on ubuntu 20.04 LTS
  • redis-server:
Redis server v=5.0.7 
sha=00000000:0
malloc=jemalloc-5.2.1
bits=64
build=4bb25a739ba4ae96
  • mongod:
db version v3.6.8
git version: 8e540c0b6db93ce994cc548f000900bdc740f80a
OpenSSL version: OpenSSL 1.1.1c  28 May 2019
allocator: tcmalloc
modules: none
build environment:
   distarch: x86_64
   target_arch: x86_64

Interpreter output:

Traceback (most recent call last):
  File "/home/binaryflesh/cve-search-ng/sbin/db_mgmt.py", line 206, in <module>
    last_modified = parse_datetime(r.headers['last-modified'], ignoretz=True)
  File "/home/binaryflesh/.local/share/virtualenvs/cve-search-ng-PEaxLL47/lib/python3.7/site-packages/dateutil/parser/_parser.py", line 1374, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/home/binaryflesh/.local/share/virtualenvs/cve-search-ng-PEaxLL47/lib/python3.7/site-packages/dateutil/parser/_parser.py", line 646, in parse
    res, skipped_tokens = self._parse(timestr, **kwargs)
  File "/home/binaryflesh/.local/share/virtualenvs/cve-search-ng-PEaxLL47/lib/python3.7/site-packages/dateutil/parser/_parser.py", line 725, in _parse
    l = _timelex.split(timestr)         # Splits the timestr into tokens
  File "/home/binaryflesh/.local/share/virtualenvs/cve-search-ng-PEaxLL47/lib/python3.7/site-packages/dateutil/parser/_parser.py", line 207, in split
    return list(cls(s))
  File "/home/binaryflesh/.local/share/virtualenvs/cve-search-ng-PEaxLL47/lib/python3.7/site-packages/dateutil/parser/_parser.py", line 76, in __init__
    '{itype}'.format(itype=instream.__class__.__name__))
TypeError: Parser must be a string or character stream, not NoneType

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions