Archive

Error while running slim partition command

Explorer

I am using splunk packaging toolkit for partioning and getting following error on
Command:
slim partition demo_splunk_app-3.0.0.tar.gz

Traceback (most recent call last):
File "/Users/ajain/Virtualenvs/slim/bin/slim", line 10, in
sys.exit(main())
File "/Users/ajain/Virtualenvs/slim/lib/python2.7/site-packages/slim/main.py", line 26, in main
args.invoke_command(args)
File "/Users/ajain/Virtualenvs/slim/lib/python2.7/site-packages/slim/partition.py", line 64, in main
), args.target_os)
File "/Users/ajain/Virtualenvs/slim/lib/python2.7/site-packages/slim/app/server_class.py", line 377, in add
server_class, dependency_graph, target_os, self._validate, is_external
File "/Users/ajain/Virtualenvs/slim/lib/python2.7/site-packages/slim/app/_installation.py", line 601, in from_dependency_graph
installation_graph._resolve()
File "/Users/ajain/Virtualenvs/slim/lib/python2.7/site-packages/slim/app/_installation.py", line 858, in _resolve
installation.resolve_dependents(self)
File "/Users/ajain/Virtualenvs/slim/lib/python2.7/site-packages/slim/app/_installation.py", line 301, in resolve_dependents
self._version_range = semantic_version.Spec(*version_range)
File "/Users/ajain/Virtualenvs/slim/lib/python2.7/site-packages/semantic_version/base.py", line 1159, in __init
_
super(LegacySpec, self).init(expression)
File "/Users/ajain/Virtualenvs/slim/lib/python2.7/site-packages/semantic_version/base.py", line 610, in init
self.clause = self._parse_to_clause(expression)
File "/Users/ajain/Virtualenvs/slim/lib/python2.7/site-packages/semantic_version/base.py", line 975, in _parse_to_clause
return cls.Parser.parse(expression)
File "/Users/ajain/Virtualenvs/slim/lib/python2.7/site-packages/semantic_version/base.py", line 997, in parse
raise ValueError("Invalid simple block %r" % block)
ValueError: Invalid simple block ''

Could someone help what is the issue?

Tags (2)

Engager

This problem is caused by having a more recent version of the semantic_version pip package.

Using an older version (pip install 'semantic_version==2.6.0') fixed the problem for me.

Splunk Employee
Splunk Employee

6 years later, that answer is the good one !
With python 2.7 not supported after 2020/01/01 the semantic_version installed by default is still too high for the slim partition command !

0 Karma

Path Finder

Hi, @ajain_mi did u ever find out the solution to this?
Thanks

0 Karma

Explorer

@mufthmu No, I couldn't. I tried to split my app according to my need for various component.

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!