Script module.py raises ValueError in line 178
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the failure with sherlock --output output.xml ., then read sherlock/core.py and sherlock/model.py, especially Tree.from_directory and set_dict at line 178. Check how the Robot Framework repository is traversed and how values containing = are handled; done means the command completes without this ValueError and processes the repository output.
Written by the indexing model from the issue text.
Description
Typing command sherlock --output output.xml . in my local repository causes occurance of such a fault:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts\sherlock.e
xe_main.py", line 7, in
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sher
lock_init.py", line 19, in run_cli
raise err
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sher
lock_init_.py", line 9, in run_cli
runner.run()
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sher
lock\core.py", line 31, in run
tree = self.map_resources_for_path(root)
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sher
lock\core.py", line 58, in map_resources_for_path
tree = Tree.from_directory(path=root, gitignore=self.config.default_gitignore)
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sher
lock\model.py", line 346, in from_directory
child_tree = cls.from_directory(path=child, gitignore=gitignore)
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sher
lock\model.py", line 346, in from_directory
child_tree = cls.from_directory(path=child, gitignore=gitignore)
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sher
lock\model.py", line 346, in from_directory
child_tree = cls.from_directory(path=child, gitignore=gitignore)
[Previous line repeated 5 more times]
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sher
lock\model.py", line 359, in from_directory
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\ast.py", line 279, in generic_visit
self.visit(item)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\ast.py", line 271, in visit
return visitor(node)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\ast.py", line 279, in generic_visit
self.visit(item)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\ast.py", line 271, in visit
return visitor(node)
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sher
lock\model.py", line 172, in visit_Variable
self.variables[node.name] = self.set_dict(node.value)
File "C:\Users\suchanek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sher
lock\model.py", line 178, in set_dict
key, val = value.split("=") if "=" in value else (value, "")
ValueError: too many values to unpack (expected 2)
My output.xml file has been loaded properly and sherlock gave me two logs:
Sherlock analysis of Robot Framework code:
Using C:\Users\suchanek\robotlte as source repository
Loaded C:\Users\suchanek\robotlte\output.xml output file
My output.xml file looks like that:
- Dominant language
- Python
- Stars
- 14
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MarketSquare/robotframework-sherlock
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 32/100
MarketSquare/robotframework-sherlock#75 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MarketSquare/robotframework-sherlock#71 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MarketSquare/robotframework-sherlock#65 · 6 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
All issues in MarketSquare/robotframework-sherlock
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
huggingface/deep-rl-class#723 ·
-
[tool] bug: Qwen3 XML tool parser raises on `...` argument values (Ellipsis is not JSON serializable)Possibly taken @super-yuki claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
verl-project/verl#8559 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TencentCloud/octop-harness#228 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
google/osv-scalibr#2585 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
NousResearch/hermes-agent#149323 ·
Maintainers usually reply within 1 day