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

[BUG] Error during the project get #244

Open
saninstein opened this issue Jun 26, 2024 · 1 comment
Open

[BUG] Error during the project get #244

saninstein opened this issue Jun 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@saninstein
Copy link

Observed behavior

Raises exception

Traceback (most recent call last):
  File "/Users/alex/PycharmProjects/idface-toloka-dataflow/drafts/draft.py", line 44, in <module>
    cli.get_project('xxx')
  File "/Users/alex/PycharmProjects/idface-toloka-dataflow/venv/lib/python3.10/site-packages/toloka/util/_managing_headers.py", line 73, in wrapped
    return run_in_current_context(func, *args, **kwargs)
  File "/Users/alex/PycharmProjects/idface-toloka-dataflow/venv/lib/python3.10/site-packages/toloka/util/_managing_headers.py", line 100, in run_in_current_context
    result = func(*args, **kwargs)
  File "/Users/alex/PycharmProjects/idface-toloka-dataflow/venv/lib/python3.10/site-packages/toloka/client/__init__.py", line 1284, in get_project
    response = self._request('get', f'/v1/projects/{project_id}')
  File "/Users/alex/PycharmProjects/idface-toloka-dataflow/venv/lib/python3.10/site-packages/toloka/client/__init__.py", line 399, in _request
    return self._raw_request(method, path, **kwargs).json(parse_float=Decimal)
  File "/Users/alex/PycharmProjects/idface-toloka-dataflow/venv/lib/python3.10/site-packages/toloka/client/__init__.py", line 395, in _raw_request
    response = self._do_request_with_retries(method, f'/api{path}', **kwargs)
  File "/Users/alex/PycharmProjects/idface-toloka-dataflow/venv/lib/python3.10/site-packages/toloka/client/__init__.py", line 361, in _do_request_with_retries
    return wrapped(method, path, **kwargs)
  File "/Users/alex/PycharmProjects/idface-toloka-dataflow/venv/lib/python3.10/site-packages/tenacity/__init__.py", line 334, in wrapped_f
    copy = self.copy()
  File "/Users/alex/PycharmProjects/idface-toloka-dataflow/venv/lib/python3.10/site-packages/tenacity/__init__.py", line 260, in copy
    return self.__class__(
TypeError: RetryingOverURLLibRetry.__init__() missing 1 required positional argument: 'base_url'

Process finished with exit code 1

Expected behavior

Return the project

Python Version

3.1

Toloka-Kit Version

1.2.2

Other Packages Versions

anyio==4.4.0
attrs==23.2.0
cattrs==23.2.3
certifi==2024.6.2
charset-normalizer==3.3.2
docstring_parser==0.16
exceptiongroup==1.2.1
filelock==3.15.4
h11==0.14.0
httpcore==1.0.5
httpx==0.27.0
idna==3.7
requests==2.32.3
simplejson==3.19.2
sniffio==1.3.1
tenacity==8.4.2
toloka-kit==1.2.2
tqdm==4.66.4
typing_extensions==4.12.2
urllib3==2.2.2

Example code

cli = toloka.TolokaClient(token=TOLOKA_TOKEN, environment='PRODUCTION')
print(
    cli.get_project(xxx)
)

Relevant log output

No response

@saninstein saninstein added the bug Something isn't working label Jun 26, 2024
@saninstein saninstein changed the title [BUG] [BUG] Error during the project get Jun 26, 2024
@saninstein
Copy link
Author

Downgrade of the tenacity helps

pip install -U tenacity==8.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant