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

Error in logging: TypeError: not all arguments converted during string formatting #170

Open
sjagoe opened this issue Mar 27, 2019 · 0 comments
Assignees
Labels

Comments

@sjagoe
Copy link
Member

sjagoe commented Mar 27, 2019

When running haas with --log-level=debug and discovering tests from a file path, an exception is raised from the logging module, caused by incorrect logging usage.

2019-03-27 12:24:33,665 DEBUG    [haas.plugins.discoverer:205] Starting test discovery
--- Logging error ---
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1034, in emit
    msg = self.format(record)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 880, in format
    return fmt.format(record)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 619, in format
    record.message = record.getMessage()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 380, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/Users/sjagoe/.local/share/virtualenvs/locust/bin/haas", line 10, in <module>
    sys.exit(main())
  File "/Users/sjagoe/.local/share/virtualenvs/locust/lib/python3.7/site-packages/haas/main.py", line 24, in main
    return application.run()
  File "/Users/sjagoe/.local/share/virtualenvs/locust/lib/python3.7/site-packages/haas/haas_application.py", line 115, in run
    for start in args.start
  File "/Users/sjagoe/.local/share/virtualenvs/locust/lib/python3.7/site-packages/haas/haas_application.py", line 115, in <listcomp>
    for start in args.start
  File "/Users/sjagoe/.local/share/virtualenvs/locust/lib/python3.7/site-packages/haas/plugins/discoverer.py", line 214, in discover
    start_filepath, top_level_directory=top_level_directory)
  File "/Users/sjagoe/.local/share/virtualenvs/locust/lib/python3.7/site-packages/haas/plugins/discoverer.py", line 354, in discover_by_file
    top_level_directory)
Message: 'Discovering tests in file: start_filepath=%r, top_level_directory='
@sjagoe sjagoe added the bug label Mar 27, 2019
@sjagoe sjagoe self-assigned this Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant