huggingface / huggingface/smolagents
[BUG] Tool.from_space() missing 2 required positional arguments: 'name' and 'description.
- Dominant language
- Python
- Stars
- 29.3k
- Forks
- 3k
- Avg merge
- 17m
- Merged PRs (30d)
- 2
Description
**Describe the bug**
Running smolagent using cli and getting following error: `Tool.from_space() missing 2 required positional arguments: 'name' and 'description'`
**Code to reproduce the error**
```
smolagent "Translate 'Hello World' to French" --tools "Genius-Society/translator:translator:Translate text from English to French"
```
**Error logs (if any)**
```
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\touse\anaconda3\envs\smolagents\Scripts\smolagent.exe\__main__.py", line 7, in
File "D:\Convo\smolagents\src\smolagents\cli.py", line 104, in main
available_tools.append(Tool.from_space(tool_name))
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Tool.from_space() missing 2 required positional arguments: 'name' and 'description'
```
**Expected behavior**
name and description are required parameters so we have to pass it to `Tool.from_space`
**Packages version:**
`1.10.0.dev0`
Contributor guide
Research direction
Start at src/smolagents/cli.py line 104 and inspect the Tool.from_space signature alongside how the --tools value is parsed. The fix is complete when the provided smolagent command loads the translator tool without the missing-arguments TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100