Skip to content

Lazy attribute not correctly implemented in logger #456

Description

@sandre35

Environment details

  1. Specify the API at the beginning of the title (for example, "Places: ..."): client
  2. OS type and version
  3. Library version and other environment information: 4.7.1 and 4.7.2

Steps to reproduce

  1. Create a client googlemaps.Client()

Code example

gmaps = googlemaps.Client(...)

Stack trace

tests/geo/tests.py:527: in test_fully_qualified_address
    gmaps.GoogleMapsBackend()._extract_address(
bluetils/geo/backends/gmaps.py:51: in __init__
    gmaps = googlemaps.Client(
../../../venv/0/lib/python3.9/site-packages/googlemaps/client.py:194: in __init__
    logger.info("API queries_quota:", self.queries_quota)
/opt/python-3.9.6/lib/python3.9/logging/__init__.py:1446: in info
    self._log(INFO, msg, args, **kwargs)
/opt/python-3.9.6/lib/python3.9/logging/__init__.py:1589: in _log
    self.handle(record)
/opt/python-3.9.6/lib/python3.9/logging/__init__.py:1599: in handle
    self.callHandlers(record)
/opt/python-3.9.6/lib/python3.9/logging/__init__.py:1661: in callHandlers
    hdlr.handle(record)
bluetils/utf8_logging.py:14: in handle
    self.format(record)
/opt/python-3.9.6/lib/python3.9/logging/__init__.py:927: in format
    return fmt.format(record)
/opt/python-3.9.6/lib/python3.9/contextlib.py:79: in inner
    return func(*args, **kwds)
bluetils/gdpr/testing.py:55: in format
    formatted_record = super().format(record)
/opt/python-3.9.6/lib/python3.9/contextlib.py:79: in inner
    return func(*args, **kwds)
bluetils/settings/logs.py:45: in format
    return super().format(record)
/opt/python-3.9.6/lib/python3.9/logging/__init__.py:663: in format
    record.message = record.getMessage()
/opt/python-3.9.6/lib/python3.9/logging/__init__.py:367: in getMessage
    msg = msg % self.args
E   TypeError: not all arguments converted during string formatting

The issue was introduced by #455

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

releasedtriage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions