Skip to content

Tests warning: Thread.run() takes 1 positional argument but x were given #4361

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

Open
sentrivana opened this issue May 5, 2025 · 0 comments
Open
Labels
Bug Component: Tests Dealing with tests

Comments

@sentrivana
Copy link
Contributor

sentrivana commented May 5, 2025

If you run tox -e py3.12-redis-latest locally, this gets logged as a warning:

  /Users/ivana/dev/sentry-python/.tox/py3.13-redis-latest/lib/python3.13/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread sentry.monitor

  Traceback (most recent call last):
    File "/Users/ivana/.pyenv/versions/3.13.1/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
      self.run()
      ~~~~~~~~^^
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 130, in run
      return _run_old_run_func()
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 125, in _run_old_run_func
      reraise(*_capture_exception())
      ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ivana/dev/sentry-python/sentry_sdk/utils.py", line 1746, in reraise
      raise value
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 123, in _run_old_run_func
      return old_run_func(self, *a, **kw)
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 130, in run
      return _run_old_run_func()
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 125, in _run_old_run_func
      reraise(*_capture_exception())
      ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ivana/dev/sentry-python/sentry_sdk/utils.py", line 1746, in reraise
      raise value
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 123, in _run_old_run_func
      return old_run_func(self, *a, **kw)
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 130, in run
      return _run_old_run_func()
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 125, in _run_old_run_func
      reraise(*_capture_exception())
      ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ivana/dev/sentry-python/sentry_sdk/utils.py", line 1746, in reraise
      raise value
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 123, in _run_old_run_func
      return old_run_func(self, *a, **kw)
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 130, in run
      return _run_old_run_func()
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 125, in _run_old_run_func
      reraise(*_capture_exception())
      ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ivana/dev/sentry-python/sentry_sdk/utils.py", line 1746, in reraise
      raise value
    File "/Users/ivana/dev/sentry-python/sentry_sdk/integrations/threading.py", line 123, in _run_old_run_func
      return old_run_func(self, *a, **kw)
  TypeError: Thread.run() takes 1 positional argument but 4 were given

The above is repeated multiple times, each time with a longer stacktrace, and with a higher number of provided arguments in the last message.

Not sure yet if this is anything concerning -- but we should take a look

@sentrivana sentrivana changed the title POTel tests warning: Thread.run() takes 1 positional argument but x were given Tests warning: Thread.run() takes 1 positional argument but x were given May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Component: Tests Dealing with tests
Projects
None yet
Development

No branches or pull requests

1 participant