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_SPL
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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...

Rethinking Zero Trust: From Product Purchases to Logical Control Evidence

Implementing Zero Trust (ZT) across complex environments often falters at the very beginning due to a ...