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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...