Repository navigation
deploy related -> content variant issue #24
Copy link
Copy link
Labels
deployIssue related to data deploy functionality from databusIssue related to data deploy functionality from databus
Description
Following command fails:
python3 -m databusclient deploy --versionid https://databus.openflaas.de/milandoj/group-1/artifact-1/version-1 --title "version-1 title" --abstract "version abstract" --description "version description" --license http://dalicc.net/licenselibrary/AdaptivePublicLicense10 --apikey KEYYYYY 'https://data.openflaas.de/milandoj/group-1/artifact-1/version-1/file.txt.bz2'
https://databus.openflaas.de/milandoj/group-1/artifact-1/version-1
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/databusclient/__main__.py", line 3, in <module>
cli.app()
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/typer/main.py", line 214, in __call__
return get_command(self)(*args, **kwargs)
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/click/core.py", line 1161, in __call__
return self.main(*args, **kwargs)
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/typer/main.py", line 500, in wrapper
return callback(**use_params) # type: ignore
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/databusclient/cli.py", line 20, in deploy
dataid = client.createDataset(versionId,title,abstract,description,license,distributions)
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/databusclient/client.py", line 143, in createDataset
(name, cvs, formatExtension, compression, contentLength, sha256sum) = __getFileInfo(artifactName, dst_string)
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/databusclient/client.py", line 89, in __getFileInfo
cvs = __getCVs(distribution_str)
File "/Users/milan/Library/Python/3.7/lib/python/site-packages/databusclient/client.py", line 13, in __getCVs
cv_str = args[1].strip("_")
IndexError: list index out of range
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
deployIssue related to data deploy functionality from databusIssue related to data deploy functionality from databus
Activity
m1ci commentedon Oct 22, 2025
another command that does not work - also related to content variants
[-]content variant related issue[/-][+]deploy related -> content variant issue[/+]AggarwalKashvi commentedon Jan 2, 2026
Hi! if no one is working on it I would like to take up this issue
vaibhav45sktech commentedon Jan 3, 2026
Greetings @m1ci . I’d like to take ownership of this issue and work on a fix could you please assign it to me?
agrim-git-hub commentedon Jan 3, 2026
Hi @m1ci , I would like to take this up.
I have analyzed the traceback and the cause is clear. The def get_content_variants() method in deploy.py strictly expects the distribution string to split into multiple parts. When a user provides a URL/filename that doesn't match this expected format , args ends up with fewer than 2 elements, causing the IndexError at args[1].strip("").
What i suggest we can do:
Add a defensive check inside def _get_content_variants() to verify len(args) >= 2 before accessing the index.
If the check fails, raise a custom ValueError with a descriptive message (explaining the expected format) instead of letting the raw IndexError crash the application.
Add a unit test with a malformed URL to verify the clean error handling.
I am already set up and familiar with the codebase from my current work on the checksum feature (PR #44). I can implement this fix immediately.
test: add regression test for issue dbpedia#24 to verify fix