Security

Error while running slim partition command

ajain_mi
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)

nebffa
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.

ldongradi_splun
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

mufthmu
Path Finder

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

0 Karma

ajain_mi
Explorer

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

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...