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!

All Work and No Play? Not at .conf26! Unwind at These Evening Events

Between hands-on technical sessions, keynote reveals, and diving into live architectures, .conf26 is packed ...

Join the Hackathon at .conf26 and build a No-Code AI agent

Join us for the AI Agent Buildathon, an in-person, three-hour hands-on Hackathon where you’ll use Splunk Agent ...

Level Up Your Workflow: Mastering Splunk Cloud Management via Terraform

Tech Talk Recap   From Chaos to Control: Scaling Splunk Cloud with Infrastructure as Code Managing apps in ...