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

Getting "TypeError: format requires a mapping" in python 3.11 #38

Open
vijaysawant opened this issue Feb 3, 2023 · 0 comments
Open

Comments

@vijaysawant
Copy link

Description: While using python 3.11 only, wait_for throws TypeError: format requires a mapping
Note: Not observed in python 3.8, python 3.9
Traceback:

        property_name = setting_update.name
        property_value = 19
        with session:
>           session.settings.update(f"name={property_name}", property_value)

tests/foreman/ui/test_settings.py:537: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../workenv/lib64/python3.11/site-packages/airgun/entities/settings.py:31: in update
    view.wait_for_update()
../workenv/lib64/python3.11/site-packages/widgetastic/widget/base.py:80: in wrapped
    return method(self, *new_args, **new_kwargs)
../workenv/lib64/python3.11/site-packages/airgun/views/settings.py:29: in wait_for_update
    wait_for(
/usr/lib64/python3.11/logging/__init__.py:1843: in debug
    self.log(DEBUG, msg, *args, **kwargs)
/usr/lib64/python3.11/logging/__init__.py:1887: in log
    self.logger.log(level, msg, *args, **kwargs)
/usr/lib64/python3.11/logging/__init__.py:1559: in log
    self._log(level, msg, args, **kwargs)
/usr/lib64/python3.11/logging/__init__.py:1634: in _log
    self.handle(record)
/usr/lib64/python3.11/logging/__init__.py:1644: in handle
    self.callHandlers(record)
/usr/lib64/python3.11/logging/__init__.py:1706: in callHandlers
    hdlr.handle(record)
/usr/lib64/python3.11/logging/__init__.py:978: in handle
    self.emit(record)
../workenv/lib64/python3.11/site-packages/_pytest/logging.py:343: in emit
    super().emit(record)
/usr/lib64/python3.11/logging/__init__.py:1118: in emit
    self.handleError(record)
/usr/lib64/python3.11/logging/__init__.py:1110: in emit
    msg = self.format(record)
/usr/lib64/python3.11/logging/__init__.py:953: in format
    return fmt.format(record)
../workenv/lib64/python3.11/site-packages/_pytest/logging.py:114: in format
    return super().format(record)
/usr/lib64/python3.11/logging/__init__.py:687: in format
    record.message = record.getMessage()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <LogRecord: widgetastic_null, 10, /home/..#path#../workenv/lib64/python3.11/site-packages/wait_for/__init__.py, 203, "[SettingsView]: Started %(message)r at %(time).2f">

    def getMessage(self):
        """
        Return the message for this LogRecord.
    
        Return the message for this LogRecord after merging any user-supplied
        arguments with the message.
        """
        msg = str(self.msg)
        if self.args:
>           msg = msg % self.args
E           TypeError: format requires a mapping

/usr/lib64/python3.11/logging/__init__.py:377: TypeError


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